Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT * FROM wbs
- WHERE wbs_status_id = 0
- AND poi_id IN (SELECT poi_id FROM oc_poi op,(SELECT name, location || ' ' || post_code || ' ' || street || ' ' || country || ' ' || street_nr ADDRESS, COUNT(*) dups FROM oc_poi
- WHERE oc_poi_category_id = 101901
- AND oc_poi_status_id = 0
- GROUP BY name, location || ' ' || post_code || ' ' || street || ' ' || country || ' ' || street_nr
- HAVING COUNT(*) > 1) dup_records
- WHERE location || ' ' || post_code || ' ' || street || ' ' || country || ' ' || street_nr = dup_records.ADDRESS
- AND op.name = dup_records.name
- AND op.oc_poi_status_id = 0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement