Skip to main content

Ok so i am having a massive brain cramp and know that this will probally be a easy fix. LOL

 

i am trying to create a column that register if something is in bay 1 with a WDR of bay 2, below is what i thought was the answer but i keep getting error messages, Any help would be greatly appreciated

 

CASE WHEN (BAY_NO = 'LM' and WAIV_DEV_REJ_NO = 'G%') THEN '1' ELSE '0' END)

Try

 

CASE WHEN (BAY_NO = 'LM' and WAIV_DEV_REJ_NO LIKE 'G%') THEN '1' ELSE '0' END)

 

You can’t equal a wildcard.


If this is the exact syntax you are using the parenthesis are not correct. Remove last end parenthesis if that is the case.

CASE WHEN (BAY_NO = 'LM' and WAIV_DEV_REJ_NO LIKE 'G%') THEN '1' ELSE '0' END

 


@Tomas Ruderfelt @ShawnBerk 

Thank you both,  both suggestions worked i knew it was somthing simple thank you again