Using the Replace command with a set.
I have a single column that I want to return partial values from.
Example
000270 KS EQUITY
123456 US EQUITY
345612 CORP CUSIP
The select statment should return
000270 KS (notice how I cant look for the first space)
123456
345612
right now I'm using a complicated CASE and REPLACE statement. I would like to use a set statement such as REPLACE(<field>,'EQUTIY' 'US EQUITY' 'CORP CUSIP','') instead of a seperate line for each one.
REPLACE(<field>,'EQUTIY','')
REPLACE(<field>,'US EQUTIY','')
REPLACE(<field>,'CORP CUSIP','')
Any ideas?
I have a single column that I want to return partial values from.
Example
000270 KS EQUITY
123456 US EQUITY
345612 CORP CUSIP
The select statment should return
000270 KS (notice how I cant look for the first space)
123456
345612
right now I'm using a complicated CASE and REPLACE statement. I would like to use a set statement such as REPLACE(<field>,'EQUTIY' 'US EQUITY' 'CORP CUSIP','') instead of a seperate line for each one.
REPLACE(<field>,'EQUTIY','')
REPLACE(<field>,'US EQUTIY','')
REPLACE(<field>,'CORP CUSIP','')
Any ideas?