Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 not sure why this doesn't work.....

Author  Topic 

lkanitz
Starting Member

2 Posts

Posted - 2011-12-19 : 14:53:33
Here is my query:

"SELECT robotname, objectkey, catalog_name, product_name, OEM_number, paragraph_desc, sku
FROM product
WHERE lastupdated > Date_Sub(curdate(), INTERVAL 1 DAY) and lastupdated < curdate()
ORDER BY robotname"
------------------------------------------------------------------
when I try to execute the SQL it gives me this error:

Syntax error: Encountered "1" at line 3, column 50.
------------------------------------------------------------------
Is it telling me that I can not have a 1 there? If so, then how do I signify the date? Is it my logic? please help.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-12-19 : 15:04:30
This doesn't appear to be Microsoft SQL Server syntax. You should post your question on a site that specializes in whatever dbms you are using. SQLTeam is for MS SQL Server.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

lkanitz
Starting Member

2 Posts

Posted - 2011-12-19 : 15:08:21
Ok, my apologies. Thanks for the direction.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2011-12-19 : 15:50:16
It's mySQL

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page
   

- Advertisement -