Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

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.



  


 Title: sql bet
 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

  




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 Khokhar857
  Mohammed Taj746
  positive fanatic483
  Jayanta Sur479
  Vigyan Kaushik386
  Vinoth Kumar362
  Gopu Gopi340
  Gitesh Trivedi322
  neeraj sharma258
  Ramesh Jois246






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software