| decode using multiple values [message #575518] |
Wed, 23 January 2013 16:04  |
 |
cplusplus1
Messages: 30 Registered: October 2012 Location: usa
|
Member |
|
|
i am using the following within queries:
decode(qt_flag,'KT','Y',decode(qt_flag,'IT','Y','N'))
It works fine but when i use in ETL tool it is not working. Is there a way to use decode just once with multiple values like above.
Thank you very much for the helpful info.
|
|
|
|
|
|
| Re: decode using multiple values [message #575527 is a reply to message #575525] |
Wed, 23 January 2013 20:29   |
 |
Kevin Meade
Messages: 1782 Registered: December 1999 Location: Connecticut USA
|
Senior Member |
|
|
Please explain what you mean when you say "not working".
If I recall, a correct way to write
decode(qt_flag,'KT','Y',decode(qt_flag,'IT','Y','N'))
is with
decode(qt_flag,'KT','Y',decode(qt_flag,'IT','Y','N'))
syntax looks right to me.
|
|
|
|
| Re: decode using multiple values [message #575576 is a reply to message #575527] |
Thu, 24 January 2013 06:20   |
cookiemonster
Messages: 9152 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
The OP appears to be using an ETL tool that doesn't recognize all standard oracle functions. See here for example.
The correct solution would to be to get an ETL tool that actually works properly with oracle.
|
|
|
|
| Re: decode using multiple values [message #575580 is a reply to message #575518] |
Thu, 24 January 2013 07:56  |
joy_division
Messages: 4267 Registered: February 2005 Location: East Coast USA
|
Senior Member |
|
|
cplusplus1 wrote on Wed, 23 January 2013 17:04i am using the following within queries:
decode(qt_flag,'KT','Y',decode(qt_flag,'IT','Y','N'))
Just a little off topic here, but why are you using that decode statement and not the one that Solomon showed? Are you sure that is you decode statement? You did know that decode can check for multiple different values, right?
|
|
|
|