Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Date time problem

Author  Topic 

OMB
Yak Posting Veteran

88 Posts

Posted - 2001-06-18 : 10:44:44
I have the following stored procedure that inserts data into a table:

CREATE PROCEDURE [lib_transfer1] AS

INSERT INTO library_transfer

SELECT stmbiogr.student_id, stmstgde.dt_achieved,stmstgde.stage_code

FROM stmbiogr INNER JOIN stmstgde ON stmbiogr.student_id = stmstgde.student_id
WHERE stmstgde.stage_code='p01' and convert(varchar(10), dt_achieved, 103) = convert(varchar(10), getdate(), 103) and not exists (select student_id from library_transfer where library_transfer.student_id = stmstgde.student_id)


when I try to insert the information it gives me the following error :

Server: Msg 241, Level 16, State 1, Procedure lib_transfer1, Line 3
Syntax error converting datetime from character string."





   

- Advertisement -