nathanharcup
MIS
Hi All,
I'm have a column that holds two values separtated by '-'
I have selected the right value by using the below SQL;
Select substring(EU_Department, (charindex('-',EU_Department)+1), 1000) as Team from dbo.TABLE
I'm attempting now to select the left value, I'm using the below but get the error message that the left function requires two arguments, can anyone point out what im doing wrong?
Select left(substring(EU_Department, (charindex('-',EU_Department)+1), 1000)-1) as Department from dbo.TABLE
Thanks
Nathan
I'm have a column that holds two values separtated by '-'
I have selected the right value by using the below SQL;
Select substring(EU_Department, (charindex('-',EU_Department)+1), 1000) as Team from dbo.TABLE
I'm attempting now to select the left value, I'm using the below but get the error message that the left function requires two arguments, can anyone point out what im doing wrong?
Select left(substring(EU_Department, (charindex('-',EU_Department)+1), 1000)-1) as Department from dbo.TABLE
Thanks
Nathan