7 Replies Latest reply: Nov 14, 2012 4:29 PM by Mayil Vahanan Ramasamy RSS

    text format

    lin ye

      Hi,

       

      I did something to ID, and it's returning as number instead of string. My tbls won't get to join properly because things didn't match.

       

      tblX:

      sql select

      left(right(ID, 5), 4)+ '0' as NID

      from xxx.qvd;

       

      left join (tblX)

      sql select left(PIN, 9) +'0' as NID

      FROM tbl123;

       

      i want to make sure NID is a 5 digit code with ending equal to 0.

      ie. '00050' should not be 5