Selective update [message #372480] |
Wed, 14 February 2001 14:34 |
Robbie
Messages: 2 Registered: February 2001
|
Junior Member |
|
|
I am trying to update fielda and fieldb in tablea from fielda and fieldb in tableb,
but only wish to update tablea with fielda and fieldb when their value in tableb is not nulls/spaces
Any thoughts?
|
|
|
Re: Selective update [message #372488 is a reply to message #372480] |
Thu, 15 February 2001 03:35 |
amarpatgiri
Messages: 11 Registered: December 2000
|
Junior Member |
|
|
Try something like this?
update emp e set dept = ( select dept from
emp1 e1 where e.empno = e1.empno and e1.dept is not null),
birthdate = (select birthdate from emp1 e1
where e.empno = e1.empno and e1.birthdate is not null)
-amar
|
|
|