Solved

SQL2008 Time datatype - 00:00:00 throws syntax error

Posted on 2013-01-29
2
301 Views
Last Modified: 2013-01-29
Hi Experts,

Bit baffled, I'm testing a stored procedure on SQL2008 which is a very simple insert, one of the datacolumns is set to Time so I am entering a value in the format 00:00:00 - but I get a syntax error on the first colon...am I missing something here?!
0
Comment
Question by:forsters
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
DoutorApedeuta earned 500 total points
ID: 38830590
Didn,t you forget the quote characters? '00:00:00'
Is the data type of the table you are inserting into the same as the SP parameter?
0
 

Author Comment

by:forsters
ID: 38830607
Hi,
Apologies, you're right - would help if I read the reply properly!

I didn't realise Time had to be in quotes.

Many thanks
0

Featured Post

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question