var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: SQL 2000 - Substring function
I want to select the characters before "-" from Column A.
I'd would like to select it as:
Just combine the Left() and CharIndex() functions.
I tried to use the following statement; however, the result still including '-'. how would I remove that?
select style_code, l_last, left (style_code, charindex('-', style_code)) from style_last
You nearly got it :-)
Function CHARINDEX returns the position of "-" and you have to cut your string before this position.
select style_code, l_last, left (style_code, charindex('-', style_code)-1) from style_last
Originally Posted by rene819