i have the following SP and I wanted to check the value of companyinfo.status and i have used select companyinfo.status...but getting the error...
The multi-part identifier "companyinfo.status" could not be bound.
What should i use to see the value of column?
-- ***********************UPDATE STATUS ******************************
UPDATE companyinfo
SET companyinfo.status=RESULT.status
FROM
(
select XMLProdTable.status,XMLProdTable.compId
from
OPENXML(@hDoc, 'master/TRANSACTION', 2)
WITH (
compId varchar(200),
status bigint
) XMLProdTable
LEFT OUTER JOIN companyinfo COMPANY ON XMLProdTable.compId=COMPANY.dataID
where --cmp.status !=8 And
COMPANY.status !=1 AND
COMPANY.status < 6 AND
XMLProdTable.status < COMPANY.status
) AS RESULT
WHERE companyinfo.dataID=RESULT.compId
IF @@ERROR<>0 BEGIN ROLLBACK TRANSACTION RETURN -101 END
select companyinfo.status