I have two tables: Test_Base and Test_Run
When a test is approved i have a stored procedure to move two columns from Test_Run to Test_Base
Column 1: WriteFileLoc (varchar)
Column 2: image (xml file in a byte[])
However, when i execute the following procedure it moves an empty image = 0x
Any ideas to why it moves the varchar but not the image (the image i want to move isn't empty)?
CREATE PROCEDURE dbo.au_InsertFileListXml ( @RunID varchar(50))
AS
DECLARE @BaseID varchar(50)
DECLARE @WriteFileLoc varchar(50)
SELECT @BaseID = Test_ID, @WriteFileLoc = Test_WriteFileLoc FROM Test_Run WHERE Test_Run_ID = @RunID
IF @WriteFileLoc = 'N'
UPDATE Test_Base SET Test_FR_FileList_N = r.Test_FR_FileList_N, Test_WriteFileLoc = @WriteFileLoc FROM Test_Base b,Test_Run r WHERE b.Test_ID = @BaseID;
ELSE IF @WriteFileLoc = 'Y'
UPDATE Test_Base SET Test_FR_FileList_Y = r.Test_FR_FileList_Y, Test_WriteFileLoc = @WriteFileLoc FROM Test_Base b,Test_Run r WHERE b.Test_ID = @BaseID;
GO
When a test is approved i have a stored procedure to move two columns from Test_Run to Test_Base
Column 1: WriteFileLoc (varchar)
Column 2: image (xml file in a byte[])
However, when i execute the following procedure it moves an empty image = 0x
Any ideas to why it moves the varchar but not the image (the image i want to move isn't empty)?
CREATE PROCEDURE dbo.au_InsertFileListXml ( @RunID varchar(50))
AS
DECLARE @BaseID varchar(50)
DECLARE @WriteFileLoc varchar(50)
SELECT @BaseID = Test_ID, @WriteFileLoc = Test_WriteFileLoc FROM Test_Run WHERE Test_Run_ID = @RunID
IF @WriteFileLoc = 'N'
UPDATE Test_Base SET Test_FR_FileList_N = r.Test_FR_FileList_N, Test_WriteFileLoc = @WriteFileLoc FROM Test_Base b,Test_Run r WHERE b.Test_ID = @BaseID;
ELSE IF @WriteFileLoc = 'Y'
UPDATE Test_Base SET Test_FR_FileList_Y = r.Test_FR_FileList_Y, Test_WriteFileLoc = @WriteFileLoc FROM Test_Base b,Test_Run r WHERE b.Test_ID = @BaseID;
GO