Help please!!!

E

erick-flores

I am getting a syntax error when I tried to execute this query:

Field: rep_code: Right(remote_dm_salesforecast.rep_code,3)
Total: Group By
Append to: rep_code

This is the error im getting:
[Informix][Informix ODBC Driver][Informix]A syntax error has ocurred.
(#-201)

Any ideas??? I am going crazy with this error, I REALLY need help

Thanks
 
J

Jeff Boyce

What are you trying to accomplish? The description sounds like you want to
append the right-most 3 characters of [rep_code] back to the same table as a
new record.

Are you trying to append a new record, or update an existing record?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
E

erick-flores

What are you trying to accomplish? The description sounds like you want to
append the right-most 3 characters of [rep_code] back to the same table as a
new record.

Are you trying to append a new record, or update an existing record?

Regards

Jeff Boyce
Microsoft Office/Access MVP

Thanks for your reply.
I am trying to append the right-most 3 characters of [rep_code] to the
same table as a new record.
Yes I am trying to apeend a new record.

Is there another way I can accomplish this?

Thanks
 
J

Jeff Boyce

Won't that mean you have two versions of the same [rep_code] -- one that's
longer and one that's 3 characters long? Which of the two is the "correct"
record?!

Regards

Jeff Boyce
Microsoft Office/Access MVP

erick-flores said:
What are you trying to accomplish? The description sounds like you want
to
append the right-most 3 characters of [rep_code] back to the same table
as a
new record.

Are you trying to append a new record, or update an existing record?

Regards

Jeff Boyce
Microsoft Office/Access MVP

Thanks for your reply.
I am trying to append the right-most 3 characters of [rep_code] to the
same table as a new record.
Yes I am trying to apeend a new record.

Is there another way I can accomplish this?

Thanks
 
E

erick-flores

Won't that mean you have two versions of the same [rep_code] -- one that's
longer and one that's 3 characters long? Which of the two is the "correct"
record?!

yes, I have two versions. One is out of an ODBC table and the other
one (the one I am trying to append) is to a local table in the DB. So
basically I am just trying to get the 3 last characters out of the
link table (ODBC) and append that to a local table. When I tried to
execute the query, I got the syntax error problem. Any ideas?

Thanks
 
E

erick-flores

I am thinking is a problem with the ODBC driver or something. Because
it works perfect using other ODBC driver. Any ideas?
 
E

erick-flores

This two queries also return the same syntax error.

Expr2: Trim([cust_notes])

Expr1: Left([cust_zip],5)
 
J

John W. Vinson

This two queries also return the same syntax error.

Expr2: Trim([cust_notes])

Expr1: Left([cust_zip],5)

If you've defined these queries as Passthrough queries, the database engine on
the other side of the ODBC link will give this error - it has no way to use
the local Access functions Trim or Left. Check the query properties and either
turn off the passthrough property, or rewrite the query using T-SQL or
whatever language your database engine uses.

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top