Topic: SQL*Plus and PL/SQL >> SQL query
|
Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property.
You may review the entire Oracle Certification Program Candidate Agreement online Here.
|
|
|
|
| kashik |
Posted: Jun 25, 2008 10:52:16 AM |
Total Post: 4
Joined: Jun, 2008
|
Hi All,
Can any one help me for getting a SQL for this condition.
TABLE
column A column B column C column D,columnE
VALUE1
VALUE2
VALUE3
I am selecting columnA,columnB,columnC from TABLE.
I need query to get select like
if the value is VALUE2 then this select must take columnA,column, D,columnE else columnB,columnC
Thanks
|
|
|
Gitesh |
| Posted: Jun 26, 2008 12:21:28 AM | |
|
Total Post: 322
Joined: May, 2005
|
|
|
|
|
shake |
| Posted: Jun 26, 2008 12:45:36 AM | |
|
Total Post: 84
Joined: Jun, 2008
|
Could you be more specific on the query?. It's bit difficult to understand your requirement.
|
|
|
|
|
Vish |
| Posted: Jul 27, 2008 03:24:01 AM | |
|
Total Post: 100
Joined: Jan, 2007
|
Please let me know what do u mean by Value2.
From where i get Value2. Then i may help you.
|
|
|
|
|
kashik |
| Posted: Jul 29, 2008 02:00:22 PM | |
|
Total Post: 4
Joined: Jun, 2008
|
Hi,
I got solution for this with decode function.
thank you
|
|
|
|
|
| Time Zone: EDT |
Send this thread to your friend |
|
|
|
|
Forum Rules & Description
Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user
|
| |
Get FREE Magazines
|
Top 10 Forum User
|
| Murtuja Khokhar | 857 |
| Mohammed Taj | 746 |
| positive fanatic | 483 |
| Jayanta Sur | 479 |
| Vigyan Kaushik | 386 |
| Gopu Gopi | 334 |
| Gitesh Trivedi | 322 |
| Vinoth Kumar | 264 |
| neeraj sharma | 258 |
| Ramesh Jois | 246 |
|
|