I wrote a stored procedure and I am getting an error that tells me I have an invalid column name 'FclsA'. Here is an excerpt from my procedure where the error is coming from:
The error is in the update.
Can anyone explain to me why I am getting the error?
Michael Libeson
Code:
SELECT DISTINCT ClientId, Account, Famno, ApplSeq,
CAST('FCLSXXXX' AS VARCHAR(8)) AS 'FclsA', CAST('FCLSXXXX' AS VARCHAR(8)) AS 'FclsPrev'
INTO #FCLSLIST
FROM #History WITH (NOLOCK)
ORDER BY ClientId, Account, Famno, ApplSeq;
UPDATE #FCLSLIST
SET FclsA = dbo.fn_GetFclsFromAudit(ClientId, Account, Famno, ApplSeq, ApplSeq, @CutOff),
FclsPrev = dbo.fn_GetFclsFromAudit(ClientId, Account, Famno, ApplSeq , ApplSeq, (@CutOff - 7));
The error is in the update.
Can anyone explain to me why I am getting the error?
Michael Libeson