Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
James T
 
Posts: n/a
Default 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   Report Post  
FSt1
 
Posts: n/a
Default

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   Report Post  
James T
 
Posts: n/a
Default

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   Report Post  
FSt1
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error message in Excel after exporting Access query to Excel Romi Excel Discussion (Misc queries) 0 June 6th 05 02:53 PM
Excel Query Wizard Date Format aldsv Excel Discussion (Misc queries) 1 May 31st 05 12:44 PM
Help with Charting My Data -- DavidM Charts and Charting in Excel 7 January 7th 05 01:08 PM
New web query with Excel Pro Edition 2003 Chandler Links and Linking in Excel 2 December 15th 04 06:03 PM
Excel Query Via Sybase Gary Excel Discussion (Misc queries) 1 December 7th 04 07:58 PM


All times are GMT +1. The time now is 01:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"