Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

missing operator

Status
Not open for further replies.

firebreath67

Programmer
Joined
Aug 10, 2004
Messages
8
Location
CA
Select [Shipping Customers`.CustomerNumber], [Shipping Customers`.ShippingToName], [Shipping Customers`.ShippingAddress_1], [Shipping Customers`.ShippingAddress_2], [Shipping Customers`.ShippingCity], [Shipping Customers`.ShippingState], [Shipping Customers`.ShippingZip], [Shipping Customers`.ShippingCountry], [Shipping Customers`.ShippingPhone], [Shipping Customers`.ShippingFax] From [Shipping Customers] [Shipping Customers] Where Shipping Customer.CustomerNumber=12512

this is the output to my query.

here is the query:
SQL = SQL & " Select"
SQL = SQL & " [Shipping Customers`.CustomerNumber],"
SQL = SQL & " [Shipping Customers`.ShippingToName],"
SQL = SQL & " [Shipping Customers`.ShippingAddress_1],"
SQL = SQL & " [Shipping Customers`.ShippingAddress_2],"
SQL = SQL & " [Shipping Customers`.ShippingCity],"
SQL = SQL & " [Shipping Customers`.ShippingState],"
SQL = SQL & " [Shipping Customers`.ShippingZip],"
SQL = SQL & " [Shipping Customers`.ShippingCountry],"
SQL = SQL & " [Shipping Customers`.ShippingPhone],"
SQL = SQL & " [Shipping Customers`.ShippingFax]"
SQL = SQL & " From"
SQL = SQL & " [Shipping Customers] [Shipping Customers]"


SQL = SQL & " Where "
SQL = SQL & "Shipping Customer.CustomerNumber='" & trim(request("item_id")) & "'"

keep getting syntax error(missing operator)
help
 
Why all this ` ?
Have you tried this ?
SQL = SQL & " Select"
SQL = SQL & " CustomerNumber,"
SQL = SQL & " ShippingToName,"
SQL = SQL & " ShippingAddress_1,"
SQL = SQL & " ShippingAddress_2,"
SQL = SQL & " ShippingCity,"
SQL = SQL & " ShippingState,"
SQL = SQL & " ShippingZip,"
SQL = SQL & " ShippingCountry,"
SQL = SQL & " ShippingPhone,"
SQL = SQL & " ShippingFax"
SQL = SQL & " From"
SQL = SQL & " [Shipping Customers]"
SQL = SQL & " Where "
SQL = SQL & "CustomerNumber='" & trim(request("item_id")) & "'"
If CustomerNumber is defined as numeric in [Shipping Customers], get rid of the single quotes surrounding the tested value in the where clause.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Even if you replace this:
SQL = SQL & " Select"
By this:
SQL = " Select"
Have you tried to write the SQL string in order to copy'n'paste in an access sql code window to see what happen ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top