Solved

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

Posted on 2013-01-29
2
296 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
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
table fragmentation 40 74
Write a function 5 25
How to query date ranges with SQL 6 25
t-sql splitting string column 5 27
Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

760 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now