EagleTempest
Technical User
SQL Server 2000
I'm not sure if it's possible to have a nested case statement or if I should use a subquery instead. I have inconsistent data to deal with.
Here's my logic statement:
How can I achieve this logic statement in SQL?
I'm not sure if it's possible to have a nested case statement or if I should use a subquery instead. I have inconsistent data to deal with.
Here's my logic statement:
Code:
If LEN(ProjNumber) > 0 THEN
IF ISNUMBER(SUBSTRING(ProjNumber,1,4) -1 THEN
SUBSTRING(ProjNumber,8, LEN(ProjNumber) -7)
ELSE
ProjNumber
END IF
ELSE
ProjNumb = "--"
END IF