You are currently viewing the BOOK: Beginning SQL Server 2005 Programming ISBN: 978-0-7645-8433-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
hi...
i have created the table with columns
NAME VARCHAR(30)
DOB SMALLDATETIME
i want to insert a record using the insert statement.
now i tried to insert the record using the following statement
insert into tbDetails values('Jhon', '13/06/1985')
it gave me an error stating
"The conversion of char data type to smalldatetime data type resulted in an out-of-range smalldatetime value. The statement has been terminated."
so can u please help me solving this issue.
An alternative to inserting the date is to use the format dd-mmm-yyyy eg. 25-Sep-2006 then SQL has no problem in knowing which is the day of the month and which is the month.