SELECT CASE removes my leading zeros from my select statement.
This is my logic:
case when lc.lunchCode IS NULL THEN s.personID ELSE lc.lunchCode END as POSID
The lc.lunchCode is a text field. And if i do a straight select statement like (SELECT lc.lunchCode), then everything is fine. But i need the case statement.
I also can't pad the number. The lunch codes are not a fixed length.
Any help would be GREATLY appreciated!