sirbounty
asked on
Label names must be unique within a query batch or stored procedure
I'm inserting data into a SQL server.
Whenever I enclose my date fields in #, I get the above error.
The query seems to work if I enclose them in apostrophes (')
What could the problem be? The fields in sql are smalldatetime, and the values I'm inputting are:
#12/06/2007#,#12/06/2007 11:00:00 AM#,#12/06/2007 11:30:00 AM#
Whenever I enclose my date fields in #, I get the above error.
The query seems to work if I enclose them in apostrophes (')
What could the problem be? The fields in sql are smalldatetime, and the values I'm inputting are:
#12/06/2007#,#12/06/2007 11:00:00 AM#,#12/06/2007 11:30:00 AM#
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
# is not a proper character, sql server recognises only single quote for enclosing values.
ASKER
Interesting...I always thought it was #.
Thanx for the confirmation.
Thanx for the confirmation.