Can I define field as Dual without using LOAD Inline
I want to use the Dual function on a field in a LOAD statement that reads from a table. However, all the examples I'm finding about Dual only show it being used with LOAD INLINE statements. Is it possible to do what I want? If so, could someone please give me the syntax?
Let's use the below as a starting example. I read in a QVD containing 3 fields and want to create a 4th field that will have a 1 if an app is considered critical and 0 if it's not. However, when I create a listbox for that field, I want to display 'Yes' for the 1 and 'No' for the 0. Seems like a perfect use case for the Dual. Here's my code:
IF(Priority < 3, 1, 0) as isCritical
FROM [APPS.QVD] (qvd);
I couldn't figure out how to use the Dual function on the 'isCritical' field so I thought I'd create another table using LOAD INLINE like this:
Load dual(isCriticalText,isCriticalNum) as isCritical
As expected, the DualVals table is linked to the APPS table with the isCritical field. However, if I create a listbox for that field it still shows 0 and 1. I thought the isCriticalText would show up in the list of possible fields when creating a new listbox so I could use it, but it doesn't.