Jan 31, 2012

seperate one column to different (or) seperate if a column has both first_nm and last_nm using INSTR function


select column_nm,
substr( column_nm ,1,instr( column_nm , ',') - 1) First_nm,
trim(substr( column_nm ,instr ( column_nm, ',')+1)) last_nm
 from table_nm

No comments:

Post a Comment