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 >> missing date

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: missing date
 seena  Posted: Jun 10, 2007 11:42:49 PM

 Total Post: 4
 Joined: May, 2007






 Hi I have a query in updating missing column.

>desc emp_data
empno
st_date
end_date

>select * from em_data;

empno st_date end_date
----- -------- -------
1 01-jan-02 01-feb-04
1
1 09-mar-08 10-jan-09


how can I insert the missing record?can any one help me out?
Thanks in advance...

 gps
Posted: Jun 11, 2007 02:20:46 AM  

 Total Post: 38
 Joined: May, 2006






 
Update <table_name> set st_date=sysdate,end_date=sysdate
where st_date is null and end_date is null

 chinna
Posted: Jun 11, 2007 02:24:02 AM  

 Total Post: 28
 Joined: May, 2007






 
hi,
seena

UPDATE tablename SET ST_DATE=newvalue
WHERE ST_DATE IS NULL AND END_DATE IS NULL

take caree
byeeee



 Nand
Posted: Jun 11, 2007 04:13:26 AM  

 Total Post: 22
 Joined: Jun, 2007






 
The above query can be more simplified

update <tablename>
set start_data=sysdate, end_date=<value> where start_date is null;

 Iqbal
Posted: Jun 11, 2007 05:42:40 AM  

 Total Post: 2
 Joined: Jun, 2007






 
Update EMP_DATA set st_date=sysdate,end_date=sysdate
where st_date is null and end_date is null;


 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 Khokhar825
  Mohammed Taj746
  positive fanatic483
  Jayanta Sur479
  Vigyan Kaushik386
  Gitesh Trivedi322
  Gopu Gopi250
  Ramesh Jois245
  neeraj sharma245
  Bishal Khetan207






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