INSERT statement problem

C

ChrisP

I keep getting an error message stating that there is a
data type conversion problem.

here is my SQL:

INSERT INTO Case_Issue_Tech_t ( [Case#], [Issue#],
TechID, [Date],Time_Start,Time_End)
VALUES ('CNT-CN7152004104525-cp10', '
ISS722200475347', 'JB007', #8/28/2004#,1:00 PM,2:00 PM);


the fields Case# and Issue# need the brackets around them
because of the # sign in the name. These Case#, Issue#,
and TechID are all Text type.

Date, Time_Start, and Time_End are all set to Date/Time
type.

I tried so many different things to get it to work and it
wont work. I tried putting brackets around all the Date
and Time fields but that didn't work.I know it has to do
this the Date/Time fields.

I put values in just to try and get it to work, but
ideally it will accept input from a user. I just need to
get this darn INSERT statement working.

Thanks ahead of time for your help,
Chris
 
K

Ken Snell [MVP]

You also need to delimit the time values with # character:

INSERT INTO Case_Issue_Tech_t ( [Case#], [Issue#],
TechID, [Date],Time_Start,Time_End)
VALUES ('CNT-CN7152004104525-cp10', '
ISS722200475347', 'JB007', #8/28/2004#,#1:00 PM#,#2:00 PM#);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top