
July 11th, 2012, 09:17 AM
|
|
Registered User
|
|
Join Date: Jul 2012
Posts: 4
Time spent in forums: 1 h 2 m 30 sec
Reputation Power: 0
|
|
|
Extract 1st 3 characters from a column
My requirement is to extract the text TSI from a column data which is of the form "TSI0123". I used the substring function to extract the first 3 char to get the word "TSI". But, some cloumn data is not in the form "TSIxxx" and the substring function prints the first 3 char of them also. I want the quert to check whether the first 3 char is "TSI" if not print "NULL" in the result.
|