[Info-Ingres] changing result of select query in tablefield

Martin Bowes martin.bowes at ctsu.ox.ac.uk
Tue Apr 22 04:20:31 CDT 2008


Hi Metman,

It looks like you need a simple case statement...

select val1,
    case val2 when 'SOS' then 'Is good on pies'
         when 'PTO' then 'Please Turn Over'
         when 'ET' then 'phone home'
         else 'I dont know'
         end as val2,
    val3
from tbl

Martin Bowes
-----Original Message-----
From: info-ingres-bounces at kettleriverconsulting.com
[mailto:info-ingres-bounces at kettleriverconsulting.com] On Behalf Of
metman
Sent: 21 April 2008 17:20
To: info-ingres at kettleriverconsulting.com
Subject: [Info-Ingres] changing result of select query in tablefield

Hi

I have a tablefield which gets its values from a select query, eg

tblField = select val1, val2, val3
              FROM tbl1

My problem is that in the table tbl1, val2 has 3 different values in
it which are abbreviations. On my tablefield however, i need to
display the whole thing. EG in tbl1, val2 can be SOS, PTO or ET. If
the select query returns PTO for val2 then i would need to display
Please Turn Over.

Hope this makes sense and any help would be appreciated!
_______________________________________________
Info-Ingres mailing list
Info-Ingres at kettleriverconsulting.com
http://www.kettleriverconsulting.com/mailman/listinfo/info-ingres



More information about the Info-Ingres mailing list