Link to home
Start Free TrialLog in
Avatar of sirbounty
sirbountyFlag for United States of America

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#

ASKER CERTIFIED SOLUTION
Avatar of Ashish Patel
Ashish Patel
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
# is not a proper character, sql server recognises only single quote for enclosing values.
Avatar of sirbounty

ASKER

Interesting...I always thought it was #.
Thanx for the confirmation.