Hi,
I would like to use the MySQL CASE function in a DB read action to change the value of the table field while displaying in web page like
Thank you
I would like to use the MySQL CASE function in a DB read action to change the value of the table field while displaying in web page like
SELECT Name,
CASE shift_id
WHEN 0 then 'Morning'
WHEN 1 then 'Afternoon'
WHEN 2 then 'Night'
END
AS InternetApproved
FROM Table1Basically what I want is to display human-readable text instead of id while returning the data in a table. Is it possible in DB read action and if yes how the action should be set up?Thank you
It MIGHT be but I doubt it. Something like
CASE model.field WHEN 0 then 'Morning' END:aliasmodel.alias
CASE model.field WHEN 0 then 'Morning' END:aliasmodel.alias
Thank you healyhatman,
I tried to put your suggestion in Fields to Retrieve but it returned the error
I tried to put your suggestion in Fields to Retrieve but it returned the error
1054 Unknown column 'CASE AttendanceList.duty_type WHEN 0 then 'Morning' END' in 'field list'
(stuff here):model.alias maybe. But again I doubt it will work
This topic is locked and no more replies can be posted.
