[Migrated content. Thread originally posted on 19 August 2008]
I started receiving the error after adding the "REPLACE" routine in the SQL SELECTstatement below. Using it to clean non-standard characters from the data. Without the REPLACE no problems.ERROR [42000] [AcuCorp, Inc.][AcuODBC Driver]Expected lexical element not found: FROM expected, ( found, near line 1, column 158
80040E14
This is the whole select statement:
cmd.CommandText = "SELECT shipment_bin_num, " & _
"shipment_tracking_num, " & _
"shipment_carrier_service, " & _
"shipment_carrier, " & _
"shipment_acct_num, " & _
"shipment_acct_name, " & _
"shipment_contact, " & _
"REPLACE(REPLACE(shipment_address_1,'.',''),',',''), " & _
"REPLACE(REPLACE(shipment_address_2,'.',''),',',''), " & _
"REPLACE(REPLACE(shipment_city,'.',''),',',''), " & _
"shipment_state, " & _
"shipment_country, " & _
"REPLACE(REPLACE(shipment_postal_code,'-',''),' ',''), " & _
"REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(shipment_phone_number,'.',''),'-',''),'(',''),')',''),'Ext',''), " & _
"shipment_weight, " & _
"shipment_acct_email, " & _
"shipment_cust_cost " & _
"FROM omdynshp WHERE shipment_carrier = '"& varCarrier & "' AND shipment_bin_num
"AND shipment_tracking_num IS NULL"
Thanks in advance



