Topic: How to get calculated fields in queries?
Hi,
I just need to have calculated field values inside my a query in my script!
I just tried to use the exact same query in my script but got sql syntax Error which is works fine in calculated fields!!!!!
here is the code:
Main.Panel1.Caption := SQLExecute('CASE WHEN (SELECT b.is_active FROM bookings b WHERE b.is_active=1 AND b.id_boxes=1) != 0 THEN "Nein" ELSE "Ja" END');
I just got this error: Near CASE syntax error! and here is the returned query:
CASE WHEN (SELECT b.is_active FROM bookings b WHERE b.is_active=1 AND b.id_boxes=1) != 0 THEN "Nein" ELSE "Ja" END
how can I fix my query?
Many thanks