Created
May 2, 2013 11:59
-
-
Save eftakhairul/5501755 to your computer and use it in GitHub Desktop.
My Oracle Code Backup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO SENDABLE_DOCUMENT (DOCUMENT_ID) | |
SELECT p1.ID FROM ( | |
SELECT p2.document_id AS ID, ROWNUM AS ID_ROWNUM FROM ( | |
SELECT document_id FROM document_date | |
INNER JOIN SYNDICATED_DOCUMENT sd ON document_date.document_id = sd.ID | |
WHERE type_id = :published and document_id not in (SELECT document_id FROM document_date where type_id = :sent) | |
) p2 WHERE ROWNUM <= :maxRow | |
) p1 WHERE ID_ROWNUM >= :minRow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment