Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Ingres > Re: [Info-Ingre...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 6 Topic 5799 of 6138
Post > Topic >>

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

by "Martin Bowes" <martin.bowes@[EMAIL PROTECTED] > Apr 22, 2008 at 10:20 AM

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@[EMAIL PROTECTED]
 On Behalf Of
metman
Sent: 21 April 2008 17:20
To: info-ingres@[EMAIL PROTECTED]
 [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@[EMAIL PROTECTED]

 




 6 Posts in Topic:
changing result of select query in tablefield
metman <pjwood52@[EMAI  2008-04-21 09:20:26 
Re: changing result of select query in tablefield
ghingres@[EMAIL PROTECTED  2008-04-21 11:33:54 
Re: [Info-Ingres] changing result of select query in tablefield
"Martin Bowes"   2008-04-22 10:20:31 
Re: [Info-Ingres] changing result of select query in tablefield
"On Web" <a@  2008-04-22 09:49:36 
Re: changing result of select query in tablefield
G Jones <geraint.jones  2008-04-22 07:22:43 
Re: [Info-Ingres] changing result of select query in tablefield
Karl & Betty Schendel  2008-04-22 11:30:11 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 6 15:51:06 CDT 2008.