I'm using the CASE statement in my executeSQL in order to format my output and display exactly what I want.
case when (Placement > 4 OR Placement is null) then 0 else Placement END as SHOW
Placement is a Number field and it works fine within the ExecuteSQL
I'm trying the same thing on a TIME field, and am not able to get it to work. If anyone knows, could they help me out with the syntax? I've tried the following as well as some variations and so far nothing has worked:
case when runTime is null then 0 ELSE runTime END as SHOW
This is my entire SQL:
SELECT ' ' || DogRunDate || '- Trial ' || TrialNumber || ': ' || Element || ' ' || DogLevel || ' ' || AorBClass || ' -- P/F: ' || PassFail || ', Time: ' || case when runTime is null then 0 ELSE runTime END as SHOW || ', Placement: ' || case when (Placement > 4 OR Placement is null) then 0 else Placement END as SHOW
WHERE \"__fkDog\" = ?
AND DogLevel <> ?
AND \"__fkEvent\" = ?
ORDER BY DogRunDate, TrialNumber, SortElement, SortLevel
"; ""; ""; $nextDogFromSet; "Not Entered"; CurrentEvent::__pkCurrentEvent