Option one:
RIGHT ( ("0000000000000000" + @[User::TERMINALID] ), 16)
OR
RIGHT ( (REPLICATE("0",16) + @[User::TERMINALID] ), 16)
Assuming that the TERMINALID is a variable, if not and it is a column name, Use just RIGHT ( ("0000000000000000" + TERMINALID ), 16)
Point to note, expressions are case sensitive for column or variable names.
commented on Apr 30 2012 3:05PM