DB2 Ver9.1 on Windows o/s.
i have a column which stores member id's... in the database, values are stored as 0000088811, but on the front end app, the value for member id is only 5 digits(which may have zero - ex: 01234 as member id). question is of the 10 digits stored for the column, i want to get last five digits and want to truncate/Trim the leading 5 zeros.
my query: select STRIP(col_name, L, '0') as alias_name from table_name followed by rest of the query..... - but the problem is its striping all leading zeros, but my 5-digit member id field can have zero as its first digit...
which function and whats the syntax to my issue?
Any help is greatly appreciated...
Note: I'm very new to DB2.....
Cheers
Han