peterempson
Technical User
My report uses a sql stored procedure. Works fine in sql 2000 but when adding it to the report receiving the error:
ODBC error:[Mocrosoft][ODBC SQL Server Driver] The conversion of char data type to a datetime data type resulted in an-out of ranged datetime value.
the line in the stored procedure causing the problem is as follows;
INSERT INTO temp_whereabouts VALUES (@pa_number, @street_number, @street_entry,cast(cast(year(@street_entry) as varchar)+'-'+cast(month(@street_entry) as varchar)+'-'+cast(day(@street_entry) as varchar)+' 23:59' as datetime))
any ideas how to fix it?
ODBC error:[Mocrosoft][ODBC SQL Server Driver] The conversion of char data type to a datetime data type resulted in an-out of ranged datetime value.
the line in the stored procedure causing the problem is as follows;
INSERT INTO temp_whereabouts VALUES (@pa_number, @street_number, @street_entry,cast(cast(year(@street_entry) as varchar)+'-'+cast(month(@street_entry) as varchar)+'-'+cast(day(@street_entry) as varchar)+' 23:59' as datetime))
any ideas how to fix it?