I am getting the following data:
42ND-1000 W61ST-1000 TIFF-1000 THIR-1000
and I want to get the data before the -.
For 42ND-1000 I want 42ND only.
Advertisement
Answer
This is basic string manipulation. In SQL Server, you would do:
select left(col, charindex('-', col + '-')- 1)