PL/SQL (MOSC)

MOSC Banner

Delete with inner join on another table?

edited Jul 15, 2010 9:45AM in PL/SQL (MOSC) 5 commentsAnswered ✓
 I want to do a delete on driver2  where the rows match on driver3 using 4 columns.  Below is some sytax I've been working on that doesn't quite work yet.  Am I approaching this correctly?

delete from tlc_driver2 DR2
  inner join tlc_driver3 DR3
  where DR2.EAN = DR3.EAN
   and DR2.USER_ID = DR3.USER_ID
   and NVL(DR2.CUSTOMER_ID, 'nlvdummy') = NVL(DR3.CUSTOMER_ID, 'nlvdummy')
   and DR2.HIT_TIMESTAMP = DR3.HIT_TIMESTAMP;

Thanks
Tony

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center