Wrox Home  
Search P2P Archive for: Go

  Return to Index  

sql_language thread: Get the last 4 character of a field


Message #1 by anne.do@C... on Fri, 16 Aug 2002 14:19:53
If the field is of char/varchar datatype, then this will do. No need to typecast.

select right(FIELD_NAME),4) from TABLE_NAME

Cheers!!!
Vijay G
 anne.do@C... wrote:I have a field call SSNum. I want to do a select statement to get only 
the last 4 characters in the field SSNum. How would I do this?

SELECT ??RTrim???(SSNum) from UserTable 

Do I use RTrim?

Thanks


---------------------------------
Do You Yahoo!?
HotJobs, a Yahoo! service - Search Thousands of New Jobs

  Return to Index