>I'm "translating" an SQL statement from VFP and one of the fields I'm pulling needs to be nchar(3) left filled with '0'.
>
>In VFP it's PADL(alltrim(str(eclscore)),3,'0') - eclscore is a numeric, so I know I need to Cast(eclscore as nchar(3)), but I can't seem to find the PADL replacement - what should I be using to do the PADL?
Something like
RIGHT('000' + CAST(eclscore AS VARCHAR(3)),3)
--sb--