Advertisement
Guest User

Untitled

a guest
Apr 30th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. WITH ids_to_delete as(
  2. SELECT rh.dp_value_id
  3. FROM raw_dp_links rh LEFT OUTER JOIN dp_values dp
  4. ON rh.dp_value_id=dp.dp_value_id
  5. where dp.dp_value_id is null
  6. limit 10000
  7. )
  8. delete from raw_dp_links where dp_value_id in (select dp_value_id from ids_to_delete)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement