Hi is there some way that output can have different aliases for the THEN or ELSE of the CASE?
CASE WHEN prg.program_name LIKE '%Family Emergency%'
THEN l2prg.registration_number<font color='#0000cd'> as </font><font color='#0000CD'>'Registrant Number</font>'
ELSE l2prg.registration_number<font color='#0000cd'> as 'P</font><font color='#0000CD'>rogram Number' </font>
This does not work and I have tried various bracketing that did not work. It is not a huge deal if this can't be done because it easy enough to do this programatically but it would be nice to know if there is some way to do this?
you're on the right track but barking up the wrong tree
offtopic: anyone familiar with the classic book "Go Dog Go"?
what you want is something like this --
, CASE WHEN prg.program_name LIKE '%Family Emergency%'
THEN 'Registrant Number'
ELSE 'Program Number'
END AS number_type
although in my experience a yellow flag should go up whenever the same column sometimes means one thing and sometimes another
That is a fantastic book that my kids loved when they were little!
Yes that divergent thinking thing coming into play again. Thank you.
The customer for this application has a primary program that they want to display and input in separate fields than the other programs they have; although All these programs have a unique registrant number, program name and registration date.
If I was to break this into separate tables then I would have a complete duplicate structure to the programs table. Does it make sense to break these apart or does this way of doing things - in this case - make sense?
no, i do not like that hat
Ok, already rolled ahead keeping as is...
off topic: you have quite the plethora of classic book quotes because the 'no, i do not like that hat' is CAT in the HAT...NICE :)
just thought you should know which book i was quoting
now we can meander off into the sunset at last...