Quick SQL / ASP Question

Results 1 to 2 of 2

Thread: Quick SQL / ASP Question

  1. #1
    Join Date
    Dec 1969

    Default Quick SQL / ASP Question

    Can someone simply verify the syntax of this statement?<BR><BR><BR><BR>strSQL = "UPDATE AccountAuthorizationInformation INNER JOIN AccountStatus ON [AccountAuthorizationInformation].[Account_Authorization]=[AccountStatus].[Account_Authorization] SET AccountAuthorizationInformation.Settle_Date = [AccountStatus].[Status_Date] WHERE (([AccountStatus].[Account_Authorization] = [AccountAuthorizationInformation].[Account_Authorization]) And ([AccountAuthorizationInformation].[Settle_Date]=&#039;&#039;));"<BR>

  2. #2
    Join Date
    Dec 1969

    Default Why didn't *YOU* verify it?

    Why didn&#039;t you <BR><BR>Response.Write "SQL: " & strSQL & "&#060;HR&#062;"<BR><BR>and then go try it in whatever database it is that you are using.<BR><BR>Incidentally, without knowing (a) the database type and (b) the field types of all your field, *ANYTHING* we do would be a complete guess.<BR><BR>So here is my complete guess:<BR><BR>(a) ASSUMPTION: You are using SQL Server.<BR>(b) ASSUMPTION: [AccountAuthorizationInformation].[Settle_Date] is a DateTime field.<BR><BR>If so...<BR><BR>The last condition is the culprit. You can&#039;t possibly *have* a datetime field that has a value of &#039;&#039;. Such a field could be NULL, but it can&#039;t be &#039;&#039;.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts