| 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 |
Send this thread to your friend |