Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 8th, 2012  |  syntax: None  |  size: 0.85 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. SELECT DISTINCT cms.ID
  2. FROM dt_cms_schema.CMSStory cms, dbo.AdDbPageInfo adbpi, dbo.StoryPageElements spe, dbo.Story s, dbo.SubCategory sc, dbo.status st, dbo.Desk d
  3. WHERE (adbpi.runDate BETWEEN '2011-04-27' AND '2011-08-05')
  4. AND cms.story->storyId = s.storyId
  5. AND sc.subCategoryId = 191173
  6. AND s.storyId = spe.storyId
  7. AND spe.logicalPagesId = adbpi.logicalPageId
  8. AND s.subCategoryId = sc.subCategoryId
  9. AND s.StatusId = st.StatusId
  10. AND s.deskId = d.deskId
  11. AND s.words > 10
  12. AND d.deskName <> 'trash'
  13. AND st.statusName IN ('ready', 'output', 'web')
  14. AND NOT (s.subCategoryId in (0, 2, 51, 52, 54, 101, 200, 300, 1000, 1023, 176447, 330788, 1905902))
  15. AND NOT (s.storyname LIKE '%ol.wed%' OR s.storyname LIKE '%ol.gold%')
  16. AND NOT (s.origin LIKE '%Wire%' OR s.origin LIKE '%NYT')
  17. ORDER BY adbpi.runDate DESC, adbpi.letter ASC, adbpi.pagenum ASC, s.words DESC