Topic: SQL*Plus and PL/SQL >> sql bet
|
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.
|
|
|
|
| max |
Posted: Aug 19, 2008 05:46:03 AM |
Total Post: 14
Joined: Feb, 2008
|
i want to use substition variable in another column without being entered twice by user.
select '&d' DA, DA-sysdate
from dual;
as DA i have used an alias name of this. and dis name is calculating days with sysdate. so i want to use &d in another column
Tell me how to do this.... |
|
|
ora |
| Posted: Aug 19, 2008 06:28:13 AM | |
|
Total Post: 2
Joined: Aug, 2008
|
Hi Max,
First of all alias, we cannot used in the expressions
but u want to use the same value in diffrent columns use first
&d and after &&d
eg:-
Select '&d'
from <Tab_name>
order by '&&d';
i hope this will help u ..if i m wrong pls tell me..
Mayank
|
|
|
|
|
ora |
| Posted: Aug 19, 2008 06:30:00 AM | |
|
Total Post: 2
Joined: Aug, 2008
|
Max Query correction ** Select '&&d'
from <tab_name>
order by '&d';
|
|
|
|
|
| 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 |
| Vinoth Kumar | 362 |
| Gopu Gopi | 340 |
| Gitesh Trivedi | 322 |
| neeraj sharma | 258 |
| Ramesh Jois | 246 |
|
|