Advertisement
vojtarek

delete entites with bad enttypes (by name)

Nov 10th, 2011
400
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.75 KB | None | 0 0
  1. DELETE FROM entities
  2. WHERE EXISTS(
  3. SELECT 1 FROM enttypes
  4. WHERE
  5. enttype_id=id
  6. AND TYPE IN
  7. ('FinancialMarketIndex',
  8. 'Automobile',
  9. 'SportingEvent',
  10. 'Position',
  11. 'Organization',
  12. 'Company',
  13. 'NaturalFeature',
  14. 'Currency',
  15. 'Facility',
  16. 'IndustryTerm',
  17. 'Technology',
  18. 'Movie',
  19. 'EntertainmentAwardEvent',
  20. 'Product',
  21. 'SportsEvent',
  22. 'PublishedMedium',
  23. 'TVShow',
  24. 'RadioStation',
  25. 'PoliticalEvent',
  26. 'Holiday',
  27. 'MusicGroup',
  28. 'SportsLeague',
  29. 'OperatingSystem',
  30. 'TVStation',
  31. 'FaxNumber',
  32. 'PhoneNumber',
  33. 'MusicAlbum',
  34. 'Anniversary',
  35. 'ProgrammingLanguage',
  36. 'EmailAddress',
  37. 'MarketIndex',
  38. 'NaturalDisaster',
  39. 'FieldTerminology',
  40. 'PrintMedia',
  41. 'Sport',
  42. 'EntertainmentAward',
  43. 'TelevisionStation',
  44. 'TelevisionShow',
  45. 'RadioProgram',
  46. 'SportsGame'));
  47.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement