I have a database with linked tables to another database. I have pulled the information that I need from these tables through a make-table query. Now I want to query the new table, but I run into a problem.
Certain fields in the original database had fields with the same name such as code, and Access renamed the field with the table it was associated with such as _SYSTEM_RATE_CODE and _SYSTEM_ADJ_CODE.
When I try to do a Where statement on one of these fields such as:
Select *
FROM [Primary Table]
WHERE _SYSTEM_RATE_CODE = 'cc';
I get a "Syntax error in query expression".
I believe it's the underscores causing the problem as I rename the field to just RATECODE, the query works fine, but I can't change the table name because every time you have the make-table query update the table, it changes the field back to _SYSTEM_RATE_CODE.
My question is how do you perform a SQL query with underscores in the title, or is there a workaround.
Any help is always greatly appreciated!
thanks,
Layth
Certain fields in the original database had fields with the same name such as code, and Access renamed the field with the table it was associated with such as _SYSTEM_RATE_CODE and _SYSTEM_ADJ_CODE.
When I try to do a Where statement on one of these fields such as:
Select *
FROM [Primary Table]
WHERE _SYSTEM_RATE_CODE = 'cc';
I get a "Syntax error in query expression".
I believe it's the underscores causing the problem as I rename the field to just RATECODE, the query works fine, but I can't change the table name because every time you have the make-table query update the table, it changes the field back to _SYSTEM_RATE_CODE.
My question is how do you perform a SQL query with underscores in the title, or is there a workaround.
Any help is always greatly appreciated!
thanks,
Layth