What is the correct sql syntax for all sql statements?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I can't find anywhere the correct syntax to use now with office 2003 SP2. I
have a simple asp page that inserts a new record into a database with many
fields. This used to work:
INSERT INTO Results (Request, Cnum, user, location, date_needed) VALUES
(::Request::,::Cnum::,::user::,::location::,::date_needed::)

Now it doesn't. When I hit the Verify Query button it says there are errors.
When I actually use it on the website it says the operation failed. I need
the correct syntax to use for ALL statement types. This page only has Select:
http://support.microsoft.com/kb/907307
Please help. Thank you very much.
 
Hi,
You need quotes around text values and # # around dates, eg
INSERT INTO Table
(NumberField, DateField, TextField)
VALUES
(23, #2006-01-24#, 'Some Text')
 
Back
Top