troubleshooting Question

Label names must be unique within a query batch or stored procedure

Avatar of sirbounty
sirbountyFlag for United States of America asked on
Visual Basic.NETMicrosoft SQL Server
3 Comments1 Solution986 ViewsLast Modified:
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#

Ashish Patel

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros