How to make Direct SQL Read

Hi Experts,
Do you have any ideas on how to access the database tables below? It is not in the SAP ABAP Dictionary.
SELECT * FROM DBA_ROLE_PRIVS
SELECT * FROM DBA_USERS
SELECT * FROM DBA_SYS_PRIVS
WHERE
PRIVILEGE='CREATE USER' OR
PRIVILEGE='BECOME USER' OR
PRIVILEGE='ALTER USER' OR
PRIVILEGE='DROP USER' OR
PRIVILEGE='CREATE ROLE' OR
PRIVILEGE='ALTER ANY ROLE' OR
PRIVILEGE='DROP ANY ROLE' OR
PRIVILEGE='GRANT ANY ROLE' OR
PRIVILEGE='CREATE PROFILE' OR
PRIVILEGE='ALTER PROFILE' OR
PRIVILEGE='DROP PROFILE' OR
PRIVILEGE='CREATE ANY TABLE' OR
PRIVILEGE='ALTER ANY TABLE' OR
PRIVILEGE='DROP ANY TABLE' OR
PRIVILEGE='INSERT ANY TABLE' OR
PRIVILEGE='UPDATE ANY TABLE' OR
PRIVILEGE='DELETE ANY TABLE' OR
PRIVILEGE='CREATE ANY PROCEDURE' OR
PRIVILEGE='ALTER ANY PROCEDURE' OR
PRIVILEGE='DROP ANY PROCEDURE' OR
PRIVILEGE='CREATE ANY TRIGGER' OR
PRIVILEGE='ALTER ANY TRIGGER' OR
PRIVILEGE='DROP ANY TRIGGER' OR
PRIVILEGE='CREATE TABLESPACE' OR
PRIVILEGE='ALTER TABLESPACE' OR
PRIVILEGE='DROP TABLESPACES' OR
PRIVILEGE='ALTER DATABASE' OR
PRIVILEGE='ALTER SYSTEM'
Thanks a lot!

Looks like you need ABAP DB Connectivity classes for this purpose. (e.g., CL_SQL* classes)
Check the demo program ADBC_DEMO.
BR,
Suhas

Similar Messages

  • HOW TO MAKE FIELDS AS READ ONLY IN TABLE MAINTAINANCE

    HI ABAPers,
    HOW TO MAKE SOME FIELDS AS DISPLAY MODE.
    FOR SUPPOSE, THERE ARE 5 FIELDS in SM30.
    AMONG THEM 1 FIELD SHUD BE USED FOR EDITING AND THE OTHER 4 FIELDS SHUD ONLY BE USED FOR DISPLAY PURPOSE
    WHEN EVER I ENTER A VALUE IN THAT 1 PARTICULAR FIELD THEN THE DATA OF THE REMAINING 4 FIELDS SHUD BE DISPLAYED IN THE SAME SCREEN ITSELF.
    HOW CAN IT BE POSSIBLE...
    PLZ HELP.
    THNX IN ADV,
    SP.

    Hello SP,
    You can create a maintenance view for the table & here you can define the maintenance attribute for individual fields.
    For the fields you want to be READ-ONLY pass 'R' to those fields. (It is the 4th column from the left, the one to the immediate left of the Key column).
    Don't change the TMG function group directly. If you regenerate the TMG the changes would be overwritten !
    You can use the Event '01' to fulfill your requirement:
    *&      Form  f_event_01
    *       text
    FORM f_event_01.
      DATA: v_indx TYPE sy-index,
            v_land1 TYPE land1,
            v_name1 TYPE name1.
      FIELD-SYMBOLS: <vendor> TYPE lifnr,
                     <val> TYPE ANY.
      BREAK-POINT.
      "TOTAL contains all data which are read, changed and created in TMG
      LOOP AT total.
        IF <action> = neuer_eintrag " New Entry.
        OR <action> = aendern "Changed entry
        OR <action> = original. "Same as DB
          READ TABLE extract WITH KEY <vim_xtotal_key>.
          IF sy-subrc = 0.
            v_indx = sy-tabix.
          ELSE.
            CLEAR v_indx.
          ENDIF.
          ASSIGN COMPONENT 'LIFNR' OF STRUCTURE total TO <vendor>.
          CHECK sy-subrc = 0.
    *     select data from the LFA1 based on LIFNR
          SELECT SINGLE name1 land1 FROM lfa1
            INTO (v_name1,v_land1)
            WHERE lifnr = <vendor>.
          CHECK sy-subrc = 0.
    *     Populate the hidden fields NAME1 & LAND1
          ASSIGN COMPONENT 'NAME1' OF STRUCTURE total TO <val>.
          CHECK sy-subrc = 0.
          <val> = v_name1.
          ASSIGN COMPONENT 'LAND1' OF STRUCTURE total TO <val>.
          CHECK sy-subrc = 0.
          <val> = v_land1.
          MODIFY total.
          CHECK v_indx GT 0.
          extract = total. "Pass the changes in TOTAL to EXTRACT
          MODIFY extract INDEX v_indx.
        ENDIF.
      ENDLOOP.
      sy-subrc = 0.
    ENDFORM.                                                    "f_event_01
    BR,
    Suhas
    Edited by: Suhas Saha on Aug 16, 2010 11:58 AM

  • How to make direct selection handles visible against pasteboard?

    When I go to transform/resize images inside frames using the direct selection tool, I can't see the handles of the actual image because they are white against a white pasteboard.  I am using InDesign CS5 (ver 7.0.4) on a Mac. I have been using InDesign for a few years and never noticed this was a problem; all of a sudden, the handles seem invisble. I don't remember what the color scheme was before. (Maybe I am losing my mind). Did the colors change with an update? There is an option in preferences to select the color of the pasteboard, but this doesn't seem to have any effect. In the meantime, I can't find the handles to resize/transform images. I can input a percentage for scaling, but this is only useful sometimes. How do I make direct selection handles visible against the pasteboard?

    Not specifically a path. When I select an image in a layout with the selection tool, yes the frame border is the color of the layer. When I select the same image with the direct selection tool to see the full extent of the uncropped image, the border of the image is white with white handles. Since my pasteboard is white, I can't see the image border when it extends off my color layout and onto the pasteboard.

  • Direct SQL Read Question

    HI Experts,
    Do we have a transaction for Direct SQL Access?
    I have to execute oracle commands:
    SELECT * FROM DBA_ROLE_PRIVS
    SELECT * FROM DBA_USERS
    SELECT * FROM DBA_SYS_PRIVS
       WHERE
          PRIVILEGE='CREATE USER' OR
          PRIVILEGE='BECOME USER' OR
          PRIVILEGE='ALTER USER' OR
          PRIVILEGE='DROP USER' OR
          PRIVILEGE='CREATE ROLE' OR
          PRIVILEGE='ALTER ANY ROLE' OR
          PRIVILEGE='DROP ANY ROLE' OR
          PRIVILEGE='GRANT ANY ROLE' OR
          PRIVILEGE='CREATE PROFILE' OR
          PRIVILEGE='ALTER PROFILE' OR
          PRIVILEGE='DROP PROFILE' OR
          PRIVILEGE='CREATE ANY TABLE' OR
          PRIVILEGE='ALTER ANY TABLE' OR
          PRIVILEGE='DROP ANY TABLE' OR
          PRIVILEGE='INSERT ANY TABLE' OR
          PRIVILEGE='UPDATE ANY TABLE' OR
          PRIVILEGE='DELETE ANY TABLE' OR
          PRIVILEGE='CREATE ANY PROCEDURE' OR
          PRIVILEGE='ALTER ANY PROCEDURE' OR
          PRIVILEGE='DROP ANY PROCEDURE' OR
          PRIVILEGE='CREATE ANY TRIGGER' OR
          PRIVILEGE='ALTER ANY TRIGGER' OR
          PRIVILEGE='DROP ANY TRIGGER' OR
          PRIVILEGE='CREATE TABLESPACE' OR
          PRIVILEGE='ALTER TABLESPACE' OR
          PRIVILEGE='DROP TABLESPACES' OR
          PRIVILEGE='ALTER DATABASE' OR
          PRIVILEGE='ALTER SYSTEM'
    Any suggestions?
    Moderator Message: You have already asked this question in another thread. Thread locked.

    Hi,
    Thanks for your reply. So I still have to create a program for Native SQL Statements?
    Or do you have other ideas on how to do this without creating programs? Please consider the tables that I want to read (please refer to my previous post) are not seen in SE16n or SQVI (not in ABAP Doctionary).
    Thanks a Lot!

  • How to make my card reader  open in camera raw when I insert  sd card with Canon 6d images and also link to CC version Ps?

    How do I make camera raw and photoshop cc open when I insert sd card from 6d canon. this canon code was not supported in my cs5 Ps.

    I could see you wanting LR ,Bridge or some other image organizer to open.  ACR is not a start able application and Photoshop has no feature to import images from your camera's sd media to computers storage devices.  I just use Windows File explorer.  Look at your OS learn how to change you card reader's autoplay settings. On windows you will find information like this.

  • How to make a page read only

    Hi all,
    Can anyone please help me out on the following issue.
    How to make a total page read only, so that he/she can not make any changes. I want the total page read only.
    Do we have any functions to do that?
    I need to do through peoplecode only because i have to check a condition.
    Please help me.
    Thank you,
    Bye.

    Without customizing, this may be accomplished via Permission List Security.
    Go to PeopleTools - Security - Permission List
    Select the desired Permission List. Click on the Pages tab.
    Find the menu and click on "Edit Components" hyperlink.
    Find the Component on the List and click on the "Edit Pages" hyperlink.
    Click on the Display Only check box for each page in the component you wish Display Only.
    If that does not sufice, you may use PeopleCode to set the Field DisplayOnly property to true for those editable fields that you wish not to be.
    HTH
    Steven E. Davies

  • How to make iMovie to read ADVC-110???

    I'm struggling how to make iMovie to recognize my Canopus ADVC-110 so I can transfer my VHS tapes to iMovie..
    Pleease help

    Hi s
    < When I open up iMovie HD - which video format do I use? >
    • DV
    • Go down under the viewer window and You can select Camera or a pare of siccors.
    Camera should have a black triangle and let You select iSight or ADVC. If not it doesn't detect the
    ADVC
    • Most probably it is. 6-pin end is about double the size and is rectangular eccept on short end that
    are curved to prevent wrong turning
    4-pin end is smaller and has an indent on one of it's longer sides for same reason.
    If it is not dectected on either of Your Macs it indicates a problem with either the ADVC or the FW-Cable.
    • The Cable is far more often the problem. Try to borrow another one and test.
    HERE Comes my long long list. Use it with care - not all apply to Your situation.
    I would print-out and cheque off those that are usably. No guarantee at all.
    Capture/Import problems:
    a) File-Vault is on - turn it off
    b) don’t Daisy chain camcorder - external hard disk - Mac
    (except for some Canon-Cameras)
    c) Slow hard disk (fragmented: repair permissions, repair hard disk, use a faster hard disk)
    d) Something is occupying the CPU/System, like other programs, Internet etc.
    e) Bad RAM-chips
    f) drop outs on the miniDV-tape - make a camera to camera copy on a tape which You have previous recorded with a time code (dummy recording).
    g) FW-wire cable OK?
    h) Break in the time-code on the miniDV tape (make a camera to camera copy on a tape which is prerecorded with nothing/anything so that the tape has a time-code from beginning to the end)
    i) defective camera TRY IT ON ANOTHER MAC !
    j) remove bookmarks in iMovie project
    k) Do You have desktop pictures or screen-savers active? Try turning them off.
    l) Updating - OS has to be a clean install - not an update eg from X.3.x to X.4.x (no good)
      OS X.4.0-2 needs a clean install to work (I use X.3.9)
    m) Updating QT and/or other updates (to 7 needs v6 to be cleaned out first)
      QT v.7 needs a clean install to work (I use 6.5.2)
    n) Have you tried the crazy fix:
    Open GarageBand, play a few notes, close it and reopen iMovie. The camera should import fine now. (Sue/SDillini)
    o) NEW (from Sue/SDillini):
    Trash the Font Collections Folder.
    These files are found:
    /YourUserName/Library/FontCollections folder.
    Drag the folder to the trash and launch iMovie. iMovie will create a new FontCollections folder containing the files it needs when it next opens.
    p) or thrashing the com.apple.imovie.plist file (Rodney Brown2)
    q) - Other programs interfering like Flip4Mac
    r) - Third party or old plug-ins
    May be You find some help in my list:
    Mac:
    • hardware
    ◊ Slow hard disk (fragmented: repair permissions, repair hard disk, use a faster hard disk)
    ◊ I wonder how full your Mac's hard disc is. (David Babsky) A near full hard disk prevents Import/Capture.
    10% free is recommended + space for Import/Capture + work space (about 4 to
    5 times the amount needed for Capture) eg on a 200Gb hard disk You need 20Gb + (one hour tape)
    13Gb + 50Gb = about 80 to 90Gb free space.
    ◊ Disconnect all other ext devices (FW and USB) exept Camera (and keyboard + mouse) and try again
    ◊ Rebuild Desktop (Tech-tool or fingersetting during start-up) (System up to 9)
    ◊ Reset PRAM (Tech-tool or keyboard finger settings alt-cmd-P-R ??)
    ◊ Reset PMU ( Restting the PMU...is the the alt-ctrl-shift and powerbutton shortcut? ) (Sue)
    PMU: http://docs.info.apple.com/article.html?artnum=86760
    PMU/SMU are essentially the same in the PM G5.
    ◊ Reset SMU
    SMU: http://docs.info.apple.com/article.html?artnum=300341
    ◊ Bad RAM-chips
    ◊ disconnect Mac from powerline (not just switch off, really plug out) for a few minutes to reset FW ports
    • software
    ◊ File-Vault is on - turn it off
    ◊ Something is occupying the CPU/System, like other programs, Internet etc.
    ◊ Do You have desktop pictures or screen or energy-savers active? Try turning them off.
    ◊ Updating - OS has to be a clean install - not an update eg from X.3.x to X.4.x (no good) OS X.4.0-5 needs a clean install to work (I use X.3.9)
    ◊ Updating QT and/or other updates (to 7 needs v6 to be cleaned out first) QT v.7.0.0-4 needs a clean install to work (I use 6.5.2)
    ◊ Have you tried the crazy fix: Open GarageBand, play a few notes, close it and reopen iMovie. The camera should import fine now. Sue/SDillini
    ◊ Running iDVD at the same time as iMovie can cause problems: (Lennart Thelander)
    ◊ If You also have installed FinalCut Express/pro there are possibly problems with this
    ◊ Other programs that interferes like Flip4Mac
    ◊ Codecs added to QuickTime
    ◊ Old plug-ins to iMovie or third party alike
    iMovie:
    ◊ remove bookmarks in iMovie project
    ◊ Trash: com.apple.iMovie.plist and com.apple.iMovie3.plist : files (Xinram)
    Connection:
    ◊ don’t Daisy chain Camcorder <--> external hard disk <--> Mac
    ◊ FW-wire cable, is it OK?
    ◊ USB/USB2 is NO GO !
    ◊ Cheque FW connection at Camera end. OK? (Adam Smith1)
    ◊ Cheque FW connection at Mac end. OK?
    Camera:
    ◊ The Camera is set to VTR ? (not as when You ”film” record with it)
    ◊ You may be need to go to the Camera menu and select digital out.
    ◊ defective camera TRY IT ON ANOTHER MAC ! (if the A/D chip in the camera is harmed then it will say in iMovie that the camera is connected and You can forward resp. backward the tape but there will be no picture or sound just the blue screen).
    ◊ connect camera to power-line, not battery-only....(Karsten Schlüter)
    ◊ Canons don't allow daisychaining on firewire, make it "only device" on port (Karsten Schlüter)
    ◊ Cheque the menu on Your Camera so that it communicates with the FW digitally to Your Mac
    ◊ Date and Time is correct on Your Camera ?
    Tape:
    ◊ Drop outs on the miniDV-tape - make a camera to camera copy on a tape which You have previous recorded with a time code (dummy recording).
    ◊ Break in the time-code on the miniDV tape (make a camera to camera copy on a tape which is pre-recorded with nothing/anything so that the tape has a time-code from beginning to the end)
    ◊ If You recorded in LP-mode (90 min on a standard 60 min tape with 12-bit sound). Try to change in iMovie pref. to import but not as individual clips. If this doesn’t work You have to make a Camera to Camera copy with the receiving Camera set to SP-mode and 16-bit sound.
    More:
    ◊ follow advises here http://docs.info.apple.com/article.html?artnum=43000
    ◊ follow Grandmaster Dan's advice for Sony cameras here: http://www.danslagle.com/mac/iMovie/usage/5020.shtml
    NEWS: Jerry Harris writes:
    I know that in a lot of the new Sony HD cameras, iMovie requires that you turn i.Link Conv off. I would look for a similar setting for your camera. This setting has to do with shooting a movie in one format, and using the camera to import as a different format. For instance, if you shoot HD footage and have i.Link conv on - the camera will send DV to the computer etc...
    So, case in point: look for a setting on your camera that has to do with the video format and see if that helps.
    Yours Bengt

  • How to make form as read only when another time as  user sees it..

    Hi All,
    I have a form to raise the issue. once the issue is raised it appears in the issue raised reports( that is form on a report )
    so all can view this report and click on issue no ..the form with details appear .
    but i want to restrict it , by allowing only one up manager to view the form on a report in editable format rest all can just view it .
    how can i do this?????????
    can any one help me with this ????..
    my approach is like this ...
    a column called "checked shud be added to issue table , then its values must be set to "raised" when issue is submitted for the very first time..( so it is zero when the end user is submitting it ).
    when ( the logged in user =1 up manager or checked!="raised") then
    form fields to be displayed as edited
    else
    form fields need to be read only .
    Thanks & Regards,
    Nandini Thakur.
    Edited by: Nandini thakur on Jun 26, 2010 12:04 PM

    Nandini,
    If you edit any item, you can see a section where you can specify "Read-Only" condition. Here you can write your read-only logic using SQL OR PL/SQL or predefined conditions.
    Cheers,
    Hari

  • How to make form field read only for users with certain permissions

    We need to make two form fields read only for users with certain permissions. Kindly guide me on how to do this in Infopath. I searched and there is an option to disable to the column, but no option to select user permissions. 
    Please give your suggestion on this. 
    thanks.

    Hi,
    See the link below:
    http://info.akgroup.com/blog-0/bid/69277/InfoPath-Restrict-visibility-to-users-in-a-SharePoint-Group
    Here you can add the fomatting action on the field to disable the field if those users belong to certain Sharepoint group (does not matter the permission levels though). Hope it helps.
    Regards, Kapil ***Please mark answer as Helpful or Answered after consideration***

  • How to make Select List Read only (Keep key Data)

    I'd like to make a select list read only when the screen is in maintenance mode because the select list value is part of the key.
    However, when I make the select list read only, the update fails because it appears making it disable lose's it's value.
    How can I make a select list read only and keep it's value for update.

    In HTML Header I have
    <script type="text/javascript">
    function Disable_List(pthis,hideitem)
    if ($x(hideitem).value == 'Y')
    {   $x(pthis).disabled = "disabled";
    </script>
    <script type="text/javascript">
    function Load_Start()
    Disable_Item('P5_SUBCODE','P5_XW_HAS_VALUE');
    Disable_List('P5_LTY','P5_XW_HAS_VALUE');
    </script>
    When I click apply changes, my Validation check that doesn't allow nulls in the "P5_LTY" fires saying the field can't be null. The select list is grayed out and I see the value, but the validation check thinks it's null.
    Edited by: spuchc on Jun 15, 2010 8:03 AM

  • How to make in sql query

    I HAVE TABLE ABC WITH TWO COLUM
    ENO NUMBER(3)
    ENAME VARCHAR2(10);
    SELECT ENO,ENAME FROM ABC
    ENO ENAME
    123 SMITH
    423 ALLEN
    332 DAVID
    562 AMUL
    678 KING
    986 GEORGE
    621 ANDY
    I WILL PASS PARAMETER TO MY SQL
    FOR EXAMPLE LIKE 143
    I NEED OUTPUT LIKE
    ENO ENAME
    123 SMITH
    423 ALLEN
    332 DAVID
    621 ANDY
    143 NOT EXIST OUTPUT
    ENO ENAME
    562 AMUL
    678 KING
    986 GEORGE
    I want to check the any digit in the number passed as parameter exists as a digit in the eno number, then that number and ename should be displayed
    under exist output . all others not exist
    Regards
    Dev

    Here's one way:
    SQL> VAR input varchar2(3)
    /* Input string */
    SQL> EXEC :input := '143'
    SQL> SELECT empno,
           ename
      FROM emp,
           (SELECT     SUBSTR (:input, LEVEL, 1) s
                  FROM DUAL
            CONNECT BY LEVEL <= LENGTH (:input))
    WHERE empno LIKE '%' || s || '%'
    /* Exists: */
    MPNO ENAME    
    7521 WARD     
    7499 ALLEN    
    7654 MARTIN   
    7844 TURNER   
    7934 MILLER   
    7369 SMITH    
    7839 KING     
    7934 MILLER   
    8 rows selected.
    SQL> SELECT empno,
           ename
      FROM emp
    MINUS
    SELECT empno,
           ename
      FROM emp,
           (SELECT     SUBSTR (:input, LEVEL, 1) s
                  FROM DUAL
            CONNECT BY LEVEL <= LENGTH (:input))
    WHERE empno LIKE '%' || s || '%'
    /* Not exists: */
    MPNO ENAME    
    7566 JONES    
    7698 BLAKE    
    7782 CLARK    
    7788 SCOTT    
    7876 ADAMS    
    7900 JAMES    
    7902 FORD     
    7 rows selected.

  • How to make the sql with unions to run faster

    I have the following sql which takes long time to run in sqlplus. This is in oracle 10, can I use hints to speed up the process. Union all brings all rows, but I want to eliminate the duplicates.
    select A.EMPLID,S.OPRID,A.LASTUPDDTTM,A.EMPL_RCD_NBR,A.LAST_NAME,A.FIRST_NAME,A.DEPTID,B.COMPANY,B.PAYGROUP,B.PAY_END_DT,B.OFF_CYCLE,
    B.ERNCD_REG_HRS,B.REG_HRS,0,B.REG_HRLY_EARNS
    from PS_EMPLOYEES A,PS_PAY_EARNINGS B,PS_SCRTY_TBL_DEPT S,PSTREENODE T
    where S.ACCESS_CD = 'Y' and T.SETID = ' ' and T.TREE_NAME = 'DEPT_SECURITY'
    and T.EFFDT = S.TREE_EFFDT and T.TREE_NODE = A.DEPTID and T.TREE_NODE_NUM between S.TREE_NODE_NUM
    and S.TREE_NODE_NUM_END
    and not exists (select 'X' from PS_SCRTY_TBL_DEPT S1
    where S.OPRID = S1.OPRID
    and S.TREE_NODE_NUM <> S1.TREE_NODE_NUM
    and T.TREE_NODE_NUM between S1.TREE_NODE_NUM
    and S1.TREE_NODE_NUM_END
    and S1.TREE_NODE_NUM between S.TREE_NODE_NUM
    and S.TREE_NODE_NUM_END)
    and B.EMPLID = A.EMPLID and B.EMPL_RCD_NBR = A.EMPL_RCD_NBR
    and B.SINGLE_CHECK_USE IN ('C', 'N') and (B.REG_HRS<>0 or B.REG_HRLY_EARNS<>0)
    and B.PAY_LINE_STATUS in ('C','F')
    union
    select A.EMPLID,S.OPRID,A.LASTUPDDTTM,A.EMPL_RCD_NBR,A.LAST_NAME,A.FIRST_NAME,A.DEPTID,B.COMPANY,B.PAYGROUP,B.PAY_END_DT,B.OFF_CYCLE,
    B.ERNCD_REG_HRS,B.REG_HRS,0,B.REG_EARNS
    from PS_EMPLOYEES A,PS_PAY_EARNINGS B,PS_SCRTY_TBL_DEPT S,PSTREENODE T
    where S.ACCESS_CD = 'Y' and T.SETID = ' ' and T.TREE_NAME = 'DEPT_SECURITY'
    and T.EFFDT = S.TREE_EFFDT and T.TREE_NODE = A.DEPTID and T.TREE_NODE_NUM between S.TREE_NODE_NUM
    and S.TREE_NODE_NUM_END
    and not exists (select 'X' from PS_SCRTY_TBL_DEPT S1
    where S.OPRID = S1.OPRID
    and S.TREE_NODE_NUM <> S1.TREE_NODE_NUM
    and T.TREE_NODE_NUM between S1.TREE_NODE_NUM
    and S1.TREE_NODE_NUM_END
    and S1.TREE_NODE_NUM between S.TREE_NODE_NUM
    and S.TREE_NODE_NUM_END)
    and B.EMPLID = A.EMPLID and B.EMPL_RCD_NBR = A.EMPL_RCD_NBR
    and B.SINGLE_CHECK_USE IN ('C', 'N') and (B.REG_HRS<>0 or B.REG_HRLY_EARNS<>0)
    and B.PAY_LINE_STATUS in ('C','F')
    union
    select A.EMPLID,S.OPRID,A.LASTUPDDTTM,A.EMPL_RCD_NBR,A.LAST_NAME,A.FIRST_NAME,A.DEPTID,B.COMPANY,B.PAYGROUP,B.PAY_END_DT,B.OFF_CYCLE,
    B.ERNCD_OT_HRS,B.OT_HRS,0,B.OT_HRLY_EARNS
    from PS_EMPLOYEES A,PS_PAY_EARNINGS B,PS_SCRTY_TBL_DEPT S,PSTREENODE T
    where S.ACCESS_CD = 'Y' and T.SETID = ' ' and T.TREE_NAME = 'DEPT_SECURITY'
    and T.EFFDT = S.TREE_EFFDT and T.TREE_NODE = A.DEPTID and T.TREE_NODE_NUM between S.TREE_NODE_NUM
    and S.TREE_NODE_NUM_END
    and not exists (select 'X' from PS_SCRTY_TBL_DEPT S1
    where S.OPRID = S1.OPRID
    and S.TREE_NODE_NUM <> S1.TREE_NODE_NUM
    and T.TREE_NODE_NUM between S1.TREE_NODE_NUM
    and S1.TREE_NODE_NUM_END
    and S1.TREE_NODE_NUM between S.TREE_NODE_NUM
    and S.TREE_NODE_NUM_END)
    and B.EMPLID = A.EMPLID and B.EMPL_RCD_NBR = A.EMPL_RCD_NBR
    and B.SINGLE_CHECK_USE IN ('C', 'N')
    and (B.OT_HRS<>0 or B.OT_HRLY_EARNS<>0)
    union
    select
    A.EMPLID,S.OPRID,A.LASTUPDDTTM,A.EMPL_RCD_NBR,A.LAST_NAME,A.FIRST_NAME,A.DEPTID,B.COMPANY,B.PAYGROUP,B.PAY_END_DT,B.OFF_CYCLE,
    C.ERNCD,C.OTH_HRS,C.OTH_PAY,C.OTH_EARNS
    from PS_EMPLOYEES A,PS_PAY_EARNINGS B,PS_PAY_OTH_EARNS C,PS_SCRTY_TBL_DEPT S,PSTREENODE T
    where S.ACCESS_CD = 'Y' and T.SETID = ' ' and T.TREE_NAME = 'DEPT_SECURITY'
    and T.EFFDT = S.TREE_EFFDT and T.TREE_NODE = A.DEPTID and T.TREE_NODE_NUM between S.TREE_NODE_NUM
    and S.TREE_NODE_NUM_END
    and not exists (select 'X' from PS_SCRTY_TBL_DEPT S1
    where S.OPRID = S1.OPRID
    and S.TREE_NODE_NUM <> S1.TREE_NODE_NUM
    and T.TREE_NODE_NUM between S1.TREE_NODE_NUM
    and S1.TREE_NODE_NUM_END
    and S1.TREE_NODE_NUM between S.TREE_NODE_NUM
    and S.TREE_NODE_NUM_END)
    and B.EMPLID = A.EMPLID and B.EMPL_RCD_NBR = A.EMPL_RCD_NBR
    and C.COMPANY = B.COMPANY and C.PAYGROUP = B.PAYGROUP
    and C.PAY_END_DT = B.PAY_END_DT and C.OFF_CYCLE = B.OFF_CYCLE
    and C.PAGE_NBR = B.PAGE_NBR and C.LINE_NBR = B.LINE_NBR
    and C.ADDL_NBR = B.ADDL_NBR and B.SINGLE_CHECK_USE IN ('C', 'N')
    and (C.OTH_HRS<>0 or C.OTH_PAY<>0 or C.OTH_EARNS<>0)
    and B.PAY_LINE_STATUS in ('C','F')

    UNION will eliminate the duplicates. If you are seeing rows that look like duplicates, there must be something different about them that you are missing.
    If there is some set of rows that is common to all of the UNION queries and expensive to retrieve, you might try subquery factoring, e.g:
    WITH common_set AS
        ( SELECT somecols
          FROM   sometab x, othertab y
          WHERE  y.key = x.key
          AND    etc )
    SELECT a,b,c
    FROM   common_set c, table1 t
    WHERE  t.key = c.key
    UNION
    SELECT a,b,c
    FROM   common_set c, table2 t
    WHERE  t.key = c.key
    UNION
    SELECT a,b,c
    FROM   common_set c, table2 t
    WHERE  t.key = c.keyThe usual advice applies for tuning requests applies though:
    <ul><li>{thread:id=863295}</li>
    <li>{thread:id=501834}</li>
    <li>Troubleshooting Bad Execution Plans</li>
    <li>Writing Good SQL</li></ul>

  • How to make iBooks with 'Read Aloud' enabled?

    Some books in iBooks can read the text. When one of these is opened, a little speaker icon appears on the top menu. How are these iBooks created using iBooks Author?

    Hello chinajon, 
    You can do this in one of two ways. The first is to have a prerecorded audio file that you can insert in. The other would be using VoiceOver to have that feature read back the contents of the page that you are on. Take a look at the links below for more information. 
    Add a movie or an audio file
    http://help.apple.com/ibooksauthor/mac/#/blsbfe5e397
    Add an accessibility description to an object
    http://help.apple.com/ibooksauthor/mac/#/bls2593e4cd
    Take it easy,
    -Norm G. 

  • Can't figure out how to make direction aware mouse over?

    I don't have much coding skills at all so that is probably my main problem but does anyone know how to do this effect in Edge Animate? I'm very new to this program but over the last 2 weeks i've been trying to create this and epic failed. Any Advice? Thanks
    http://tympanus.net/codrops/2012/04/09/direction-aware-hover-effect-with-css3-and-jquery/

    Hi, Sekai-
    If you're trying to do this in Animate, I would throw most of the concept out and think of what the jQuery is actually trying to accomplish: it's trying to determine which direction the mouse is entering and leaving in order to determine what direction the overlay should run when you actually enter the object.  You can do the same thing by looking at the pageX and pageY of the mouseenter and mouseleave events and then doing some kind of comparison.
    Without coding it explicitly, this is how I would approach the problem:
    on every object's mouseleave (I'd use a symbol in this case, btw), try to determine the pageX and pageY and compare it to the content's dimensions in order to determine whether or not it leaves from top, right, left, or bottom.
    Based on this information, play from the symbol's timeline in the out direction (e.g. "outFromTop")
    on every object's mouseenter, try to determine the pageX and pageY and see which direction it comes from.  If I can tell, animate from that side.  If I can't, fall back to the last mouseleave's event in order to figure out where it should come from
    Based on this information, play from the symbol's timeline in a different location, from label (e.g. "inFromTop")
    Hope that helps you get going!
    Thanks,
    -Elaine

  • How to make direct DVD-to-DVD copy?

    I'm hoping this is easier than I'm making it. I work for a small theater that films every show in a weekend on 4 camera angles plus a multimedia feed. We record every angle directly to stand-alone DVD recorders (5 DVDs per show).
    I get requests from the directors to view the shows each week, and up till now, i've been dutifully using Disk Utility to make an image file of the DVD to the hard drive, then burn a new blank DVD, but this process takes about 25 minutes for every show, not to mention the disk space, and increased requests are making this too time-consuming.
    *I've got 2 DVD-writable drives; isn't there a way in OSX to directly copy a non-copy-protected DVD directly to another DVD? Wouldn't that be a big thing on the new Mac Pros that have 2 internal Superdrives? I tried doing it in Finder by copying one DVD and pasting it in the blank DVD, but that didn't work.*
    If not, is there software anybody recommends? Nero for the PC does exactly what I want but doesn't come in Mac. I'm not sure if Roxio Toast does it, and I haven't found a demo of anything else that works... (tried Fast DVD Copy, but it won't stop "analyzing media" and "Aimersoft DVD Copy for Mac" doesn't download a file that my mac will open.)
    Thanks for the assistance!
    ~Trav

    So far as I can tell (and the only thing that comes up in Disk Utility Help) is the method which requires an image file to be fully written to the Hard Drive and then burned to a blank DVD. I'm hoping to get that down to one step, DVD-to-DVD...
    Any thoughts? It seems ludicrous to me that OSX would not have this ability natively.
    ~Trav

Maybe you are looking for