Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Syntax Error in Excel Query for DATE field
I have created an excel query using ODBC, and linking to a financial software
products tables. I am attempting to enter in a criteria to reduce the number of records returned. I am trying to put in a criteria against a DATE field. However when in enter in a date and run the query I get the following error "Syntax Error". Can someone help?? |
#2
|
|||
|
|||
hi.
post your code. I'm not sure i can help but unless i see the code, all i know for sure is that you have a syntax problem. Regards FSt1 "James T" wrote: I have created an excel query using ODBC, and linking to a financial software products tables. I am attempting to enter in a criteria to reduce the number of records returned. I am trying to put in a criteria against a DATE field. However when in enter in a date and run the query I get the following error "Syntax Error". Can someone help?? |
#3
|
|||
|
|||
Dear FST1,
For some background - I am usingExcel 2000, SP-3A. 1) I am going into DATA/GET EXTERNAL DATA/NEW DATABASE QUERY. 2) Selecting my ODBC source and connecting to the source with no issues. 3) Selecting a SINGLE table from the ODBC soucred database and then VIEWING THE DATA OR EDIT THE DATA IN MICROSOFT QUERY. 4) Selecting the fields that I want to show in my query results (dropping and dragging) 5) Choosing VIEW/CRITERIA and then dropping the DATE field in the criteria section and enter in a date of the 01/05/2005. 6) When I then go RECORDS/QUERY NOW I received an error "SYNTAX ERROR". If I use criteria for other fields (not date fields) then it works ok and I do not get any error messages. So I am not using any code. Thoughts?? James "FSt1" wrote: hi. post your code. I'm not sure i can help but unless i see the code, all i know for sure is that you have a syntax problem. Regards FSt1 "James T" wrote: I have created an excel query using ODBC, and linking to a financial software products tables. I am attempting to enter in a criteria to reduce the number of records returned. I am trying to put in a criteria against a DATE field. However when in enter in a date and run the query I get the following error "Syntax Error". Can someone help?? |
#4
|
|||
|
|||
hi,
yes you are running code. in microsoft query,click on the SQL icon or go... ViewSQL. that's the code your are running. MSQ is a gui (graphic user interface). by pointing and clicking in the gui, it records your actions and records the code that corresponds with your actions. remember that all computers do is run code. even pointing and clicking or typing on the keyboard causes code to run. it's call event driven programming. but back to your problem. since your are having problems with just the date field, i suspect that you may need to inclose the date in pound signs with an operator ie #1/1/05#. the pound signs tell MSQ that it is a date and not a series of numbers. post back if that isn't it. and post the code. Regards FSt1 "James T" wrote: Dear FST1, For some background - I am usingExcel 2000, SP-3A. 1) I am going into DATA/GET EXTERNAL DATA/NEW DATABASE QUERY. 2) Selecting my ODBC source and connecting to the source with no issues. 3) Selecting a SINGLE table from the ODBC soucred database and then VIEWING THE DATA OR EDIT THE DATA IN MICROSOFT QUERY. 4) Selecting the fields that I want to show in my query results (dropping and dragging) 5) Choosing VIEW/CRITERIA and then dropping the DATE field in the criteria section and enter in a date of the 01/05/2005. 6) When I then go RECORDS/QUERY NOW I received an error "SYNTAX ERROR". If I use criteria for other fields (not date fields) then it works ok and I do not get any error messages. So I am not using any code. Thoughts?? James "FSt1" wrote: hi. post your code. I'm not sure i can help but unless i see the code, all i know for sure is that you have a syntax problem. Regards FSt1 "James T" wrote: I have created an excel query using ODBC, and linking to a financial software products tables. I am attempting to enter in a criteria to reduce the number of records returned. I am trying to put in a criteria against a DATE field. However when in enter in a date and run the query I get the following error "Syntax Error". Can someone help?? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Error message in Excel after exporting Access query to Excel | Excel Discussion (Misc queries) | |||
Excel Query Wizard Date Format | Excel Discussion (Misc queries) | |||
Help with Charting My Data -- | Charts and Charting in Excel | |||
New web query with Excel Pro Edition 2003 | Links and Linking in Excel | |||
Excel Query Via Sybase | Excel Discussion (Misc queries) |