Table1
Table2
Now I want to update my cStatus field in Table1 with this condition.
If cColorName=cLotColor I want to update my cStatus with "Yes", if not I want to update cStatus as "No".
But with this I can't get any update. How can I do this?
Thank you
Code:
nStylecode cLotName cColorName cStatus
1234 A1 BLACK
1234 A1 WHITE
1234 A1 YELLOW
45 GP WHITE
45 GP BLACK
Table2
Code:
nStylecode cLotName cColorName cLotColor
1234 A1 2 2
45 GP 6 4
Now I want to update my cStatus field in Table1 with this condition.
If cColorName=cLotColor I want to update my cStatus with "Yes", if not I want to update cStatus as "No".
Code:
SELECT _Both
IF _Both.nStylecode=_DelDtl.nStylecode AND _Both.cLotName=_DelDtl.cLotName AND _Both.cColorName=_Both.cLotColor THEN
SELECT _DelDtl
replace nStatus WITH 'YES'
ELSE
SELECT _DelDtl
replace nStatus WITH 'NO'
ENDIF
Thank you