Page 1 of 1

IF() Funktion used in Report

Posted: Wed Dec 15, 2021 4:00 pm
by marcus
Hello
i would like to use a IF() Function inside a report, to translate a table made of 1 and 0 into Yes and No. I tried using aliases in the table.
Unfortunatly

Code: Select all

SELECT IF(test_data = 1, "Yes, "No") AS word FROM table_test
is not working while

Code: Select all

SELECT test_data AS word FROM table_test
is working fine, when using a field calles 'word' inside the report.
How could I achieve my goal?
Best regards
marcus

Re: IF() Funktion used in Report

Posted: Wed Dec 15, 2021 4:03 pm
by kev1n
I think you will have to create a Procedure. This allows you to use complex queries.