35 pts.
 I need to display only last two characters
i need to disply only last two characters in a column, the column data like this 1.3.2NE,1.2.2NN,1.10CE,1.11.1NN,10.3 for this i need output like this NE,NN,CE,NN

Software/Hardware used:
ASKED: October 24, 2008  3:14 AM
UPDATED: October 24, 2008  7:13 PM

Answer Wiki:
In oracle the command would be select substr([your column name],-2,2) from [your table name] In MSSQL you would use substring instead of substr. you could also use the Right function (select right(colname,2) from table if the database engine supports it. *******Actually no, the Right function would not work in all cases - only if the column is varchar vs. char or nchar******** I went back and tested with the substring function in MSSQL but it did not work. But the Right function did work for varchar column. There is no Right function in oracle.
Last Wiki Answer Submitted:  October 24, 2008  7:13 pm  by  Randym   1,740 pts.
All Answer Wiki Contributors:  Randym   1,740 pts. , Apickel   350 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _