I was wondering if there is a way that I could do IF Statements in SQL?
My Statement:
SELECT UPR00100.EMPLNAME,
sNStr = CASE WHEN UPR00100.CODE > '1' THEN 'Higher' ELSE 'Lower' END
FROM UPR00100
IF CODE = 1 THEN
IF TXBLWAGS > '2126' THEN
'Statement
ELSE
'Statement
ENDIF
ELSE
'Code = 0
'Statement
ENDIF
Then whatever the outcome is call it 'NewWages
I hope this makes sense.
My Statement:
SELECT UPR00100.EMPLNAME,
sNStr = CASE WHEN UPR00100.CODE > '1' THEN 'Higher' ELSE 'Lower' END
FROM UPR00100
IF CODE = 1 THEN
IF TXBLWAGS > '2126' THEN
'Statement
ELSE
'Statement
ENDIF
ELSE
'Code = 0
'Statement
ENDIF
Then whatever the outcome is call it 'NewWages
I hope this makes sense.