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.

Comments are currently closed for this discussion. You can start a new one.

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