SQL to find drafts

tom.wilkinson's Avatar

tom.wilkinson

17 Feb, 2015 04:56 PM

We use Oracle for Cascade. Does any one have a SQL query they are willing to share that list asset paths of any assets with drafts in a site? Or an the minimum a count of drafts in a site?

I discovered in the past if you edit a page with web service and someone has a draft of it, they get an error when they go back t to edit the draft. I need a way to tell marketing how many drafts will be involved if I make the bulk change they want.

Thanks,

Tom

  1. Support Staff 1 Posted by Tim on 17 Feb, 2015 05:27 PM

    Tim's Avatar

    Hi Tom,

    Want to try something like this?:

    select fc.name, fc.cachePath as "path", s.name as "site", fc.draftUserId as "user with Draft" 
    from cxml_foldercontent fc, cxml_site s 
    where (fc.draftOriginalId is not null and fc.draftUserId is not null) and fc.siteId = s.id and fc.isWorkingCopy = 0 order by fc.cachePath
    
    Let me know if that returns the results you're looking for.

    Thanks!

  2. 2 Posted by tom.wilkinson on 17 Feb, 2015 05:36 PM

    tom.wilkinson's Avatar

    Tim,

    Thanks, this is exactly what I need.

    Tom

  3. Support Staff 3 Posted by Tim on 17 Feb, 2015 05:37 PM

    Tim's Avatar

    Cool! Glad I could help out. Take care, Tom!

  4. Tim closed this discussion on 17 Feb, 2015 05:37 PM.

Discussions are closed to public comments.
If you need help with Cascade CMS please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

 

26 Aug, 2016 01:19 PM
25 Aug, 2016 03:02 PM
25 Aug, 2016 12:50 PM
24 Aug, 2016 08:43 PM
24 Aug, 2016 07:20 PM
21 Aug, 2016 01:20 PM