Hello, a co-worker sent this script to me asking for help. I am unable to assist. Can someone decipher the problem with this script?
DECLARE @out AS int, @in AS int, @transnum AS int
SET @out = 1
SET @in = 1
SET @transnum = 1 BEGIN WHILE @out < 801 BEGIN WHILE @in < 5
Select master,transact
UPDATE transact
SET transact.id = @transnum, transact.ss = master.[Social Security], transact.tfromdate = '1/1/2009', transact.ttodate = '1/1/2009',
transact.ttype = @in, transact.thours = 0
FROM master
SET @in = @in + 1
SET @transnum = @transnum + 1 END
SET @in = 1
SET @out = @out + 1 END;
SQL Execution Error.
Executed SQL statement: DECLARE @out AS int, @in AS int, @transnum AS int SET @out = 1 SET @in = 1 SET @transnum = 1 BEGIN WHILE @out < 801 BEGIN WHILE @in < 5 SELECT master,transact UPDATE transact SET transact.id = @transnum, transact.ss = master.[Social Security], transa...
Error Source: .Net SqlClient Data Provider
Error Message: Invalid column name 'master'.
Invalid column name 'transact'.
DECLARE @out AS int, @in AS int, @transnum AS int
SET @out = 1
SET @in = 1
SET @transnum = 1 BEGIN WHILE @out < 801 BEGIN WHILE @in < 5
Select master,transact
UPDATE transact
SET transact.id = @transnum, transact.ss = master.[Social Security], transact.tfromdate = '1/1/2009', transact.ttodate = '1/1/2009',
transact.ttype = @in, transact.thours = 0
FROM master
SET @in = @in + 1
SET @transnum = @transnum + 1 END
SET @in = 1
SET @out = @out + 1 END;
SQL Execution Error.
Executed SQL statement: DECLARE @out AS int, @in AS int, @transnum AS int SET @out = 1 SET @in = 1 SET @transnum = 1 BEGIN WHILE @out < 801 BEGIN WHILE @in < 5 SELECT master,transact UPDATE transact SET transact.id = @transnum, transact.ss = master.[Social Security], transa...
Error Source: .Net SqlClient Data Provider
Error Message: Invalid column name 'master'.
Invalid column name 'transact'.