Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I have the following statement in a script that doesn't work. If I take out the <> at the first bracket, the satement does work but I want to be able to exclude any call signs that are CY. I have tried to do a not match statement but wasn't succesful. What am I doing wrong?
IF
(<>left(CallSign_Assign,2)='CY' AND a8_responder=1,time_clock_start-time_effective_on_scene) as A8ExPrivProvOnScene
Hello,
Try with the following expression
If(left(CallSign_Assign, 2) <> 'CY' AND a8_responder = 1, time_clock_start-time_effective_on_scene) as A8ExPrivProvOnScene
Hope that helps
The "<>" cannot be in this place.
Your statement already considers only Callsigns starting with CY and a8=1, for all other values you will receive already a NULL-value.
If you wish to filter only for the above found values, you either have to put a WHERE-clause into your script, or do a preceding load with a WHERE-clause, like
LOAD * WHERE LEN(TRIM(A8ExPrivProvOnScene)) > 0; LOAD ... IF ....
HTH
Peter