E
EagleOne
2003
The following command when executed, works fine:
dBs.Execute "INSERT INTO CHOOSEOffsets SELECT TOP 1 * FROM CHOOSERev" & _
" WHERE " & NextActualAmt & " + " & StartActualAmt & " = 0 "
But if I attempt:
dBs.Execute "INSERT INTO CHOOSEOffsets SELECT TOP 1 * FROM CHOOSERev" & _
" WHERE " & NextDovNmbr & " = " & StartDovNmbr
The ERROR is 3075 Syntax error (missing operator) in query expression 'ABC = ABC'
NOTE: NextActualAmt and StartActualAmt are Dimmed as Long
NextDovNmbr and StartDovNmbr are Dimmed as String (values both "ABC")
There appears to be a syntax difference in the WHERE clause Numeric vs String?
The full clause that I wish to perfect is:
dBs.Execute "INSERT INTO CHOOSEOffsets SELECT TOP 1 * FROM CHOOSERev" &
" WHERE " & NextActualAmt & "+" & StartActualAmt & " = 0 And " & StartActualAmt & " <= 0 And ((" & _
NextDovNmbr & "=" & StartDovNmbr & ") Or (" & NextDocNmbr & "=" & StartDocNmbr & "))"
If I attempt the full clause I get the same error. I simplified the clause above to isolate the
cause of the error
Any help appreciated.
TIA EagleOne
The following command when executed, works fine:
dBs.Execute "INSERT INTO CHOOSEOffsets SELECT TOP 1 * FROM CHOOSERev" & _
" WHERE " & NextActualAmt & " + " & StartActualAmt & " = 0 "
But if I attempt:
dBs.Execute "INSERT INTO CHOOSEOffsets SELECT TOP 1 * FROM CHOOSERev" & _
" WHERE " & NextDovNmbr & " = " & StartDovNmbr
The ERROR is 3075 Syntax error (missing operator) in query expression 'ABC = ABC'
NOTE: NextActualAmt and StartActualAmt are Dimmed as Long
NextDovNmbr and StartDovNmbr are Dimmed as String (values both "ABC")
There appears to be a syntax difference in the WHERE clause Numeric vs String?
The full clause that I wish to perfect is:
dBs.Execute "INSERT INTO CHOOSEOffsets SELECT TOP 1 * FROM CHOOSERev" &
" WHERE " & NextActualAmt & "+" & StartActualAmt & " = 0 And " & StartActualAmt & " <= 0 And ((" & _
NextDovNmbr & "=" & StartDovNmbr & ") Or (" & NextDocNmbr & "=" & StartDocNmbr & "))"
If I attempt the full clause I get the same error. I simplified the clause above to isolate the
cause of the error
Any help appreciated.
TIA EagleOne