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
 Transact-SQL (2000)
 INSERT statement fails

Author  Topic 

dollarbillg
Yak Posting Veteran

52 Posts

Posted - 2001-10-03 : 14:05:42
Hey...This is my INSERT statement.
Declare @dwgnum varchar(15),
@shtrev char(2),
@sheet char(3),
@frames char(2),
@cage char(5)
SELECT dwgnum, shtrev, sheet, frames, cage
FROM dbo.Seawolf_MID_DWG
WHERE dwgnum NOT IN
(SELECT DWGNO
FROM dbo.Seawolf_SDI_DWG)
ORDER BY dwgnum, shtrev, sheet, frames
INSERT INTO dbo.Seawolf_Needs_List (dwgnum, shtrev, sheet, frames, cage)
VALUES (@dwgnum, @shtrev, @sheet, @frames, @cage)

I get the correct data returned but when I switch EM and open the table to test the statement there is nothing in the table. Could some tell what I am doing wrong. Thanks For any help

Bill

   

- Advertisement -