Pls help me , this is very urgent

I have a column called description with values as follows
Admin Support
Admin Support
Admin Support
Air Support
Cable - Disaster Response
Cable - Operational Support
Cable - PMPP (Preparedness)
Cable - Program Support
Capacity Building
Capacity Building
Chemical, Biological, Radiological, & Nuclear
Commodity Procurement Contract
Communications
Computer Support
Contract Services (warehousing)
Coordination
Coordination
Disaster Assistance Response Program
I have another column in this table for which i have to update with the sequence nos. The update should happen in such a way that if the description is same then i have update with sequence.currval and if the description is different then i have to update with sequence.nextval for each row as follows
Admin Support----- 1
Admin Support----- 1
Admin Support----- 1
Air Support----- 2
Cable - Disaster Response----- 3
Cable - Operational Support----- 4
Cable - PMPP (Preparedness)----- 5
Cable - Program Support----- 6
Capacity Building----- 7
Capacity Building----- 7
Chemical, Biological, Radiological----- 8
Commodity Procurement Contract----- 9
Communications----- 10
Computer Support----- 11
Contract Services----- 12
Coordination----- 13
Coordination----- 13
Disaster Assistance Response----- 14
Pls help me how do i do this, this is very urgent
Thanks
Vinod

If you want your sequence to start from 1, you can eliminate creating a special sqeuence for this, you can do it using ROWNUM in SQL,update your_table a
set (a.description, a.col1)
   = (select c.description, c.rn from
        (select b.description, rownum rn from
           (select distinct description from your_table order by description) b) c
     where c.description = a.description);P.S Just an alternative.
Thx,
SriDHAR

Similar Messages

  • Pls help me this is an urgent  requirement on  ALV GRID

    Hi all
      Here i am sendig my requirement pls help me on coding ..
    Report Assignment For ELTPs:
    Selection criteria :
    Circle id : Select option without interval and mandatory
    SPR Id :  Select option without interval
    Project Status :  Parameter
    Output required in ALV Grid format with the below structure :
    cProjects ID     SPR ID     Project Name     Circle ID     Circle Description     Delegation Status     No. of CU Projects     CU-PO Share     FLCB     FLCB
    NAME     FLCL ID     FLCL Name     FLCL Email ID
    1232007
         1230
              ABCD          No     0                              
    1242007
         1240
              ABCD          Partial     2                              
    1112007
         1241
              XYZ                                             
    2222007
         1242
              WXY                                             
    1252007
         1250
              EFGH          Full     1                              
    3332007
         1251
              DEF                                             
    Requirement : 
    1.     The report should list all the CFU projects and the corresponding CU projects circle wise based on the circles entered on the selection screen and which have the SPR ids and Project status on the selection screen.
    2.     If SPR id or Project status is not entered then all the projects to be considered for the given circle/s.
    3.     It should display the details of the CFU project first. The corresponding CU projects should be listed below that CFU project in the successive rows.
    4.     For example, project 1232007 is a CFU project which does not have any CU under it. Hence, another CFU project 1242007 is displayed in the second row. It has 2 CU projects under it. The details of those two CU projects are displayed in the 3rd and 4th rows.
    5.     Total share given to the CU circle (by adding different PO shares to that circle in that project) by the CFU project should be displayed in the field ‘CU-PO Share’.
    6.     For CU projects, the fields ‘Delegation Status’, ‘No. of CU projects’ and ‘CU-PO share’ should be space.
    7.     FLCB, FLCL ID, FLCL name and FLCL email  need to given for all the projects in all the rows.
    Tables to be referred: ZSCP_PROJECT, ZSCP_CIRCLE_M, ZSCP_PJ_CL_PO_MP, ZSCP_PRJ_LINK, USR21,
    ADR6, BUT000,CGPL_TEXT.
    [<b>b]Here i done the coding the but the error showing that field catolog is not found..
    pls check this and kindly send the code .....</b></b>
    REPORT  Z_64328_TEST .
    TYPE-POOLS : SLIS.
    TABLES : ZSCP_PROJECT,ZSCP_CIRCLE_M,ZSCP_PJ_CL_PO_MP,ZSCP_PRJ_LINK,
             USR21,ADR6, BUT000.
    SELECT-OPTIONS : S_CIRID FOR ZSCP_CIRCLE_M-CIRCLE_ID NO INTERVALS.
    SELECT-OPTIONS : S_SPR_ID    FOR ZSCP_PROJECT-SPR_PROJECT_ID NO INTERVALS.
    PARAMETERS     : P_STAT  LIKE ZSCP_PROJECT-PRJ_STAT.
          DATA : GS_LAYOUT1 TYPE SLIS_LAYOUT_ALV,
                 CT_FIELDCAT1 TYPE SLIS_T_FIELDCAT_ALV,
                 G_REPID   TYPE  SY-REPID,
                 TEMP_CAT1  TYPE SLIS_FIELDCAT_ALV,
                 HEADER_ALV1 TYPE SLIS_T_LISTHEADER,
                 HEADER_ALV_WA1  TYPE SLIS_LISTHEADER,
                 GT_SORT  TYPE SLIS_T_SORTINFO_ALV WITH HEADER LINE,
                 GS_KEYINFO  TYPE SLIS_KEYINFO_ALV.
    DATA : SPRID  TYPE ZSPR_PROJECT_ID.
    DATA : CID    TYPE ZCIRCLE_ID.
    DATA : ITAB  TYPE TABLE OF ZSCP_PROJECT.
    DATA : WA    TYPE ZSCP_PROJECT.
    DATA : ITAB1 TYPE TABLE OF ZSCP_CIRCLE_M.
    DATA : WA1   TYPE ZSCP_CIRCLE_M.
    SELECT * FROM ZSCP_CIRCLE_M INTO TABLE ITAB1.
    SELECT * FROM ZSCP_PROJECT INTO TABLE ITAB WHERE SPR_PROJECT_ID IN S_SPR_ID OR CIRCLE_ID IN S_CIRID.
    LOOP AT ITAB INTO WA.
    READ TABLE ITAB1 INTO WA1 WITH KEY CIRCLE_ID = WA-CIRCLE_ID.
    WRITE : WA1-CIRCLE_DESC.
    WRITE : WA-CIRCLE_ID,
            WA-PROJECT_ID,
            WA-DELEG_STAT,
            WA-PRJ_STAT,
            WA-FLCB,
            WA-FLCL.
    ENDLOOP.
    *PERFORM FIELD_CATALOG1.
    PERFORM alv_display1.
    FORM FIELD_CATALOG1.
    CLEAR TEMP_CAT1.
    TEMP_CAT1-TABNAME = 'ITAB'.
    TEMP_CAT1-FIELDNAME = 'CIRCLE_ID'.
    TEMP_CAT1-KEY = 'X'.
    TEMP_CAT1-SELTEXT_M = 'CIRCLEID'.
    TEMP_CAT1-OUTPUTLEN = 10.
    APPEND  TEMP_CAT1 TO CT_FIELDCAT1.
    CLEAR TEMP_CAT1.
    TEMP_CAT1-TABNAME = 'ITAB'.
    TEMP_CAT1-FIELDNAME = 'SPR_PROJECT_ID'.
    TEMP_CAT1-KEY = 'X'.
    TEMP_CAT1-SELTEXT_M = 'CPROJECTID'.
    TEMP_CAT1-OUTPUTLEN = 10.
    APPEND  TEMP_CAT1 TO CT_FIELDCAT1.
    CLEAR TEMP_CAT1.
    TEMP_CAT1-TABNAME = 'ITAB'.
    TEMP_CAT1-FIELDNAME = 'CIRCLE_DESC'.
    TEMP_CAT1-KEY = 'X'.
    TEMP_CAT1-SELTEXT_M = 'CIRCLEDESC'.
    TEMP_CAT1-OUTPUTLEN = 10.
    APPEND  TEMP_CAT1 TO CT_FIELDCAT1.
    CLEAR TEMP_CAT1.
    TEMP_CAT1-TABNAME = 'ITAB'.
    TEMP_CAT1-FIELDNAME = 'DELEG_STAT'.
    TEMP_CAT1-KEY = 'X'.
    TEMP_CAT1-SELTEXT_M = 'DELGSTAT'.
    TEMP_CAT1-OUTPUTLEN = 10.
    APPEND  TEMP_CAT1 TO CT_FIELDCAT1.
    CLEAR TEMP_CAT1.
    TEMP_CAT1-TABNAME = 'ITAB'.
    TEMP_CAT1-FIELDNAME = 'PRJ_STAT'.
    TEMP_CAT1-KEY = 'X'.
    TEMP_CAT1-SELTEXT_M = 'PROJSTAT'.
    TEMP_CAT1-OUTPUTLEN = 10.
    APPEND  TEMP_CAT1 TO CT_FIELDCAT1.
    CLEAR TEMP_CAT1.
    TEMP_CAT1-TABNAME = 'ITAB'.
    TEMP_CAT1-FIELDNAME = 'FLCB'.
    TEMP_CAT1-KEY = 'X'.
    TEMP_CAT1-SELTEXT_M = 'FLCB1'.
    TEMP_CAT1-OUTPUTLEN = 10.
    APPEND  TEMP_CAT1 TO CT_FIELDCAT1.
    CLEAR TEMP_CAT1.
    TEMP_CAT1-TABNAME = 'ITAB'.
    TEMP_CAT1-FIELDNAME = 'FLCL'.
    TEMP_CAT1-KEY = 'X'.
    TEMP_CAT1-SELTEXT_M = 'FLCL1'.
    TEMP_CAT1-OUTPUTLEN = 10.
    APPEND  TEMP_CAT1 TO CT_FIELDCAT1.
    ENDFORM.   "END CATALOG1.
    FORM ALV_DISPLAY1.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
       I_CALLBACK_PROGRAM                 = G_REPID
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE             = 'TOP-OF-PAGE1 '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
       IS_LAYOUT                          = GS_LAYOUT1
       IT_FIELDCAT                        = CT_FIELDCAT1
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                            = GT_SORT[]
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                             = 'A '
      TABLES
        T_OUTTAB                          = ITAB
    EXCEPTIONS
       PROGRAM_ERROR                      = 1
       OTHERS                             = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.
    Thanks and regards
    Nagendra Kumar

    hi nagendra,
             go through this code.
    TYPE-POOLS : SLIS.
    TABLES : ZSCP_PROJECT,ZSCP_CIRCLE_M,ZSCP_PJ_CL_PO_MP,ZSCP_PRJ_LINK,
    USR21,ADR6, BUT000.
    SELECT-OPTIONS : S_CIRID FOR ZSCP_CIRCLE_M-CIRCLE_ID NO INTERVALS.
    SELECT-OPTIONS : S_SPR_ID FOR ZSCP_PROJECT-SPR_PROJECT_ID NO INTERVALS.
    PARAMETERS : P_STAT LIKE ZSCP_PROJECT-PRJ_STAT.
    DATA : GS_LAYOUT1 TYPE SLIS_LAYOUT_ALV,
    CT_FIELDCAT1 TYPE SLIS_T_FIELDCAT_ALV,
    G_REPID TYPE SY-REPID,
    TEMP_CAT1 TYPE SLIS_FIELDCAT_ALV,
    HEADER_ALV1 TYPE SLIS_T_LISTHEADER,
    HEADER_ALV_WA1 TYPE SLIS_LISTHEADER,
    GT_SORT TYPE SLIS_T_SORTINFO_ALV WITH HEADER LINE,
    GS_KEYINFO TYPE SLIS_KEYINFO_ALV.
    DATA : SPRID TYPE ZSPR_PROJECT_ID.
    DATA : CID TYPE ZCIRCLE_ID.
    DATA : ITAB TYPE TABLE OF ZSCP_PROJECT.
    DATA : WA TYPE ZSCP_PROJECT.
    DATA : ITAB1 TYPE TABLE OF ZSCP_CIRCLE_M.
    DATA : WA1 TYPE ZSCP_CIRCLE_M.
    SELECT * FROM ZSCP_CIRCLE_M INTO TABLE ITAB1.
    SELECT * FROM ZSCP_PROJECT INTO TABLE ITAB WHERE SPR_PROJECT_ID IN S_SPR_ID OR CIRCLE_ID IN S_CIRID.
    LOOP AT ITAB INTO WA.
    READ TABLE ITAB1 INTO WA1 WITH KEY CIRCLE_ID = WA-CIRCLE_ID.
    WRITE : WA1-CIRCLE_DESC.
    WRITE : WA-CIRCLE_ID,
    WA-PROJECT_ID,
    WA-DELEG_STAT,
    WA-PRJ_STAT,
    WA-FLCB,
    WA-FLCL.
    ENDLOOP.
    PERFORM FIELD_CATALOG1.
    PERFORM alv_display1.
    FORM FIELD_CATALOG1.
    CLEAR TEMP_CAT1.
    TEMP_CAT1-TABNAME = 'ITAB'.
    TEMP_CAT1-FIELDNAME = 'CIRCLE_ID'.
    TEMP_CAT1-KEY = 'X'.
    TEMP_CAT1-SELTEXT_M = 'CIRCLEID'.
    TEMP_CAT1-OUTPUTLEN = 10.
    APPEND TEMP_CAT1 TO CT_FIELDCAT1.
    CLEAR TEMP_CAT1.
    TEMP_CAT1-TABNAME = 'ITAB'.
    TEMP_CAT1-FIELDNAME = 'SPR_PROJECT_ID'.
    TEMP_CAT1-KEY = 'X'.
    TEMP_CAT1-SELTEXT_M = 'CPROJECTID'.
    TEMP_CAT1-OUTPUTLEN = 10.
    APPEND TEMP_CAT1 TO CT_FIELDCAT1.
    CLEAR TEMP_CAT1.
    TEMP_CAT1-TABNAME = 'ITAB'.
    TEMP_CAT1-FIELDNAME = 'CIRCLE_DESC'.
    TEMP_CAT1-KEY = 'X'.
    TEMP_CAT1-SELTEXT_M = 'CIRCLEDESC'.
    TEMP_CAT1-OUTPUTLEN = 10.
    APPEND TEMP_CAT1 TO CT_FIELDCAT1.
    CLEAR TEMP_CAT1.
    TEMP_CAT1-TABNAME = 'ITAB'.
    TEMP_CAT1-FIELDNAME = 'DELEG_STAT'.
    TEMP_CAT1-KEY = 'X'.
    TEMP_CAT1-SELTEXT_M = 'DELGSTAT'.
    TEMP_CAT1-OUTPUTLEN = 10.
    APPEND TEMP_CAT1 TO CT_FIELDCAT1.
    CLEAR TEMP_CAT1.
    TEMP_CAT1-TABNAME = 'ITAB'.
    TEMP_CAT1-FIELDNAME = 'PRJ_STAT'.
    TEMP_CAT1-KEY = 'X'.
    TEMP_CAT1-SELTEXT_M = 'PROJSTAT'.
    TEMP_CAT1-OUTPUTLEN = 10.
    APPEND TEMP_CAT1 TO CT_FIELDCAT1.
    CLEAR TEMP_CAT1.
    TEMP_CAT1-TABNAME = 'ITAB'.
    TEMP_CAT1-FIELDNAME = 'FLCB'.
    TEMP_CAT1-KEY = 'X'.
    TEMP_CAT1-SELTEXT_M = 'FLCB1'.
    TEMP_CAT1-OUTPUTLEN = 10.
    APPEND TEMP_CAT1 TO CT_FIELDCAT1.
    CLEAR TEMP_CAT1.
    TEMP_CAT1-TABNAME = 'ITAB'.
    TEMP_CAT1-FIELDNAME = 'FLCL'.
    TEMP_CAT1-KEY = 'X'.
    TEMP_CAT1-SELTEXT_M = 'FLCL1'.
    TEMP_CAT1-OUTPUTLEN = 10.
    APPEND TEMP_CAT1 TO CT_FIELDCAT1.
    ENDFORM. "END CATALOG1.
    FORM ALV_DISPLAY1.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_INTERFACE_CHECK = ' '
    I_BYPASSING_BUFFER = ' '
    I_BUFFER_ACTIVE = ' '
    I_CALLBACK_PROGRAM = G_REPID
    I_CALLBACK_PF_STATUS_SET = ' '
    I_CALLBACK_USER_COMMAND = ' '
    I_CALLBACK_TOP_OF_PAGE = 'TOP-OF-PAGE1 '
    I_CALLBACK_HTML_TOP_OF_PAGE = ' '
    I_CALLBACK_HTML_END_OF_LIST = ' '
    I_STRUCTURE_NAME =
    I_BACKGROUND_ID = ' '
    I_GRID_TITLE =
    I_GRID_SETTINGS =
    IS_LAYOUT = GS_LAYOUT1
    IT_FIELDCAT = CT_FIELDCAT1
    IT_EXCLUDING =
    IT_SPECIAL_GROUPS =
    IT_SORT = GT_SORT[]
    IT_FILTER =
    IS_SEL_HIDE =
    I_DEFAULT = 'X'
    I_SAVE = 'A '
    TABLES
    T_OUTTAB = ITAB
    EXCEPTIONS
    PROGRAM_ERROR = 1
    OTHERS = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.
    <b>please reward points if helpfull.</b>
    with regards,
    radhika kolluru.

  • Pls Help with this

    Hi,
    I need a help to resolve my problem.Actually i have a JSP page with a list box. When i select some value in the list box, appropriate values must list out according to the selected value.And i have a submit button to process that jsp page.
    I wrote a validation as all the fields must be entered to submit a page.
    But when i tried with the following code,it's just moving to processing page when i select a values from the list box.This is happening when i cheked the validation.
    Pls help with this code.This is very urgent.
    Code is as follows
    "Example1.jsp"
    <%
    String str1 = request.getParameter("Modem");
    %>
    <html>
    <head>
    <script language = "JavaScript">
    function Validate()
    if(document.UpdateFiosAccounts.Modem.value == "Select One")
    alert("Please select the value")
    document.UpdateFiosAccounts.Modem.focus()
    return false
    if(document.UpdateFiosAccounts.text1.value == "")
    alert("Please type some text")
    document.UpdateFiosAccounts.text1.focus()
    return false
    return true
    </script>
    </head>
    <body>
    <form name = "UpdateFiosAccounts" action="./Example1.jsp" method ="post" onSubmit= "return Validate()">
    Pls select One:<select name="Modem" size="1" onChange="document.UpdateFiosAccounts.submit()">
    <%
    if(str1 == null)
    %>
         <option value="Select One">Select One</option>
         <option value="One">One</option>
         <option value="Two">Two</option>
         <option value="Three">Three</option>
         <option value="Four">Four</option>
    <%
    else
    %>
         <option value="<%=str1%>"><%=str1%></option>
    <%
    %>
    </select><br>
    Pls type something: <input type ="text" name="text1">
    <input type ="submit" value="submit" onClick="document.UpdateFiosAccounts.action='./Accounts.jsp'">
    </form>
    </body>
    </html>

    Hi! The reason is that in the onChange property you are doing the submit, so, when you select something, it goes automatically and never pases through your validation function. So, remove that onChange. Next, the button is a submit buton, so, no matter what your validation does, the page will go. You need to change the submit type of the button to just button (<input type="button" onclick="function to validate">) and then you will get what you want. By the way, this is NOT a Java question, is more JavaScript question.
    Hope this helps.

  • Plz help me TEXTPOOL PROBLEM(VERY URGENT)

    hi experts,
    plz help in resolving this issue this is very urgent.
    error is
    The line type of "RPOOL" must be compatible with one of the types
    "TEXTPOOL".
    and its coming in :
    FORM GET_SELSCREEN_TITLE TABLES P_SCREENS STRUCTURE DYNNR.
    DATA: BEGIN OF RPOOL OCCURS 20,
    ID(1),
    NAME(8),
    TEXT(80),
    END OF RPOOL.
    READ TEXTPOOL RSVAR-REPORT LANGUAGE SY-LANGU INTO RPOOL.
    plz help me.

    Hi !
    Try this :
    DATA RPOOL LIKE TEXTPOOL OCCURS 0 WITH HEADER LINE.
    Reward if usefull,
    Regards,
    Stéphane.

  • While updating the older version iTunes to latest one it shows "a network error occurred while attempting to read from the file: C:\windows\installer\iTunes64.msi. pls help on this matter to connect my i5 to PC. Thanks in advance

    while updating the older version iTunes to latest one it shows "a network error occurred while attempting to read from the file: C:\windows\installer\iTunes64.msi. pls help on this matter to connect my i5 to PC. Thanks in advance

    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page): 
    http://majorgeeks.com/download.php?det=4459
    (2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • I have forgotten my passcode, how can I access my phone without restoring it!! PLEASE HELP!! THIS IS VERY URGENT

    I always change my password and with this particular one I somehow managed to forget it, I have gone completely blank and I can't remember it. I dont want to restore my phone because I don't want to delete my photos and my songs in itube....PLEASE HELP THIS IS VERY URGENT

    iTunes
    If you've synced your device with iTunes, you can restore your device.
    Connect the device to the computer you normally sync with.
    Open iTunes. If iTunes asks you to enter your passcode or asks you to allow access, try another computer that you've synced with. Or use recovery mode. (Click the link to be taken to the steps.)
    iTunes will automatically sync your device and create a backup. If it doesn't, sync the device with iTunes.
    After the sync is complete, restore your device.
    I

  • SQL SELECT Query Help   ..Please its very Urgent!!

    Hi All,
    I am having Oracle Database whice is storing 1000's of records daily.
    I need to select some information based on date and time.
    I am having two coloumns for Date and time. The first column(testDate) of type Date stores date as MM/DD/YY format and the second column(testTime)of type Numeric stores the time in seconds.
    The Example data is :
    testDate ------=-- testTime
    11/12/2002 --- 35000
    11/12/2002 --- 43000
    11/12/2002 --- 45000
    11/12/2002 --- 75000
    11/13/2002 --- 2000
    11/13/2002 --- 3500
    11/13/2002 --- 4300
    11/13/2002 --- 9800
    11/13/2002 --- 23000
    11/14/2002 --- 5000
    11/14/2002 --- 10000
    11/14/2002 --- 15000
    How can i write a SELECT Query to get the records of specific date and seconds to next day specific date and seconds.I mean i want all the records between 11/12/2002 --- 43000 seconds to 11/14/2002 --- 1000 seconds.
    If any one helps me in this regard iam very thank full to them.Its very urgent for me.
    Thanks

    Hi m7nra,
    I used the query as
    SELECT * FROM table
    WHERE testDate + (testTime/(24*60*60)) BETWEEN TO_DATE('MM/DD/YYYY','12.11.2002') AND TO_DATE('MM/DD/YYYY','14.11.2002')
    its giving DATE FORMAT NOT RECOGNIZED error.
    The Example data is :
    testDate ------=-- testTime
    11/12/2002 --- 35000
    11/12/2002 --- 43000
    11/12/2002 --- 45000
    11/12/2002 --- 75000
    11/13/2002 --- 2000
    11/13/2002 --- 3500
    11/13/2002 --- 4300
    11/13/2002 --- 9800
    11/13/2002 --- 23000
    11/14/2002 --- 5000
    11/14/2002 --- 10000
    11/14/2002 --- 15000
    infact i need all the records between 11/12/2002 --- 43000 seconds to 11/14/2002 --- 1000 seconds.
    Please help me to find a full query beacuse iam very new to Oracle.
    Thanks,
    S R Mannava

  • Hi this is very urgent

    could u plz explain how to populate the data into  the final internal table in this program.
    i need how to add this all select statement into one final internal table
    plz provide me
    i am using ALVgrid repors
    could u plz explain clearly with comments 
    very urgent
    TABLES: eban,                 "Purchase Requisition
            ekko,                 "Purchasing Document Header
            mereq3328,            "Purchase Requisition: Contact
            cdpos,                "Change document items
            cdhdr,                "Change document header
            dd04t.                "R/3 DD: Data element texts
    TYPE-POOLS: slis.
    TYPES :
    *declaration of type for internal table to be passed in ALV report as
    *internal table.
          BEGIN OF typ_req1,
             statu               TYPE    eban-statu,                        "Processing status of purchase requisition
             banpr               TYPE    eban-banpr,                        "Requisition Processing State
             bsart               TYPE    eban-bsart,                        "Purchase requisition document type
             banfn               TYPE    eban-banfn,                        "Purchase requisition number
             bnfpo               TYPE    eban-bnfpo,                        "Item number of purchase requisition
             ebeln               TYPE    eban-ebeln,                        "Purchase order number
             ebelp               TYPE    eban-ebelp,                        "Purchase order item number
             matnr               TYPE    eban-matnr,                        "Material Number
             txz01               TYPE    eban-txz01,                        "Short text
             creator_name        TYPE    mereq3328-creator_name,            "Creator
             afnam               TYPE    eban-afnam,                        "Name of requisitioner/requester
             lifnr               TYPE    eban-lifnr,                        "Desired vendor
             flief               TYPE    eban-flief,                        "Fixed Vendor
             ekgrp               TYPE    ekko-ekgrp,                        "Purchasing Group
             tabkey              TYPE    cdpos-tabkey,                      "Item Number
             ddtext              TYPE    dd04t-ddtext,                      "Short Text
             chngind             TYPE    cdpos-chngind,                     "Action
             value_new           TYPE    cdpos-value_new,                   "New Value
             value_old           TYPE    cdpos-value_old,                   "Old Value
             username            TYPE    cdhdr-username,                    "Name
             udate               TYPE    cdhdr-udate,                       "Date
             utime               TYPE    cdhdr-utime,                       "Time
             changenr            TYPE    cdhdr-changenr,                    "Doc Number
             tcod                TYPE    cdhdr-tcode,                       "Transaction Code
          END OF typ_req1,
    Type declaration for EBAN table fields
          BEGIN OF typ_eban,
             statu               TYPE    eban-statu,                        "Processing status of purchase requisition
             banpr               TYPE    eban-banpr,                        "Requisition Processing State
             bsart               TYPE    eban-bsart,                        "Purchase requisition document type
             banfn               TYPE    eban-banfn,                        "Purchase requisition number
             bnfpo               TYPE    eban-bnfpo,                        "Item number of purchase requisition
             ebeln               TYPE    eban-ebeln,                        "Purchase order number
             ebelp               TYPE    eban-ebelp,                        "Purchase order item number
             matnr               TYPE    eban-matnr,                        "Material Number
             txz01               TYPE    eban-txz01,                        "Short text
             afnam               TYPE    eban-afnam,                        "Name of requisitioner/requester
             lifnr               TYPE    eban-lifnr,                        "Desired vendor
             flief               TYPE    eban-flief,                        "Fixed Vendor
          END OF typ_eban,
    Type declaration for ekko table fields
          BEGIN OF typ_ekko,
             ekgrp               TYPE    ekko-ekgrp,                        "Purchasing Group
          END OF typ_ekko,
    Type declaration for cdpos table fields
          BEGIN OF typ_cdpos,
             fname               TYPE    cdpos-fname,
             changenr            TYPE    cdpos-changenr,                    "Doc Number
             objectclas          TYPE    cdpos-objectclas,                  "Object class
             objectid            TYPE    cdpos-objectid,                    "Object value
             tabkey              TYPE    cdpos-tabkey,                      "Item Number
             chngind             TYPE    cdpos-chngind,                     "Action
             value_new           TYPE    cdpos-value_new,                   "New Value
             value_old           TYPE    cdpos-value_old,                   "Old Value
            CHNGIND    type    cdpos-CHNGIND
          END OF typ_cdpos,
    Type declaration for cdhdr table fields
          BEGIN OF typ_cdhdr,
             objectclas          TYPE    cdhdr-objectclas,                  "Object class
             objectid            TYPE    cdhdr-objectid,                    "Object value
             username            TYPE    cdhdr-username,                    "Name
             udate               TYPE    cdhdr-udate,                       "Date
             utime               TYPE    cdhdr-utime,                       "Time
             changenr            TYPE    cdhdr-changenr,                    "Doc Number
             tcod                TYPE    cdhdr-tcode,                       "Transaction Code
             change_ind          TYPE    cdhdr-change_ind,
             objectid1(10)       TYPE    c,
          END OF typ_cdhdr,
    Type declaration for dd04t table fields
          BEGIN OF typ_dd04t,
             ddtext              TYPE    dd04t-ddtext,                      "Short Text
            END OF typ_dd04t,
    Type declaration for dd04t table fields
          BEGIN OF typ_mereq3328,
             creator_name        TYPE    mereq3328-creator_name,            "Creator
          END OF typ_mereq3328.
    *&   delcaratilon of internal table                                   *
          DATA:
      Internal table for final internal table
             it_req1             TYPE    STANDARD TABLE OF typ_req1,
      Internal table for eban table
             it_eban             TYPE    STANDARD TABLE OF typ_eban,
      Internal table for ekko table
             it_ekko             TYPE    STANDARD TABLE OF typ_ekko,
      Internal table for cdpos table
             it_cdpos            TYPE    STANDARD TABLE OF typ_cdpos,
      Internal table for cdhdr table
             it_cdhdr            TYPE    STANDARD TABLE OF typ_cdhdr,
      Internal table for cdhdr1 table
             it_dd04t            TYPE    STANDARD TABLE OF typ_dd04t,
      Internal table for mereq3328 table
             it_mereq3328        TYPE    STANDARD TABLE OF typ_mereq3328,
    Internal table for ALV Field Catalog
           it_fieldcat_alv     TYPE   slis_t_fieldcat_alv,
    Internal table for ALV Event
           it_events           TYPE   slis_t_event.
    *& Declaration of Work Area
      work area for final internal table
         wa_req1 TYPE typ_req1,
      work area for eban table
             wa_eban             TYPE    typ_eban,
      work area for ekko table
             wa_ekko             TYPE    typ_ekko,
      work area for cdpos table
             wa_cdpos            TYPE    typ_cdpos,
      work area for cdhdr table
             wa_cdhdr            TYPE    typ_cdhdr,
      work area for dd04t table
             wa_dd04t            TYPE    typ_dd04t,
      work area for mereq3328 table
             wa_mereq3328        TYPE    typ_mereq3328.
    Declaration  of work area for Field Catalog
           wa_fieldcat         TYPE    slis_fieldcat_alv,
    SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE text-001.
    SELECT-OPTIONS: s_bsart    FOR     eban-bsart   OBLIGATORY
                               DEFAULT 'znb1' TO 'znb2',                 "Purchase requisition document type
                    s_banfn    FOR     eban-banfn,                       "Req Number
                    s_bnfpo    FOR     eban-bnfpo,                       "Req Item Number
                    s_ebeln    FOR     eban-ebeln,                       "Purchase Order Number
                    s_ebelp    FOR     eban-ebelp,                       "Purchase Order Item Number
                    s_matnr    FOR     eban-matnr.                       "Material Number
    PARAMETER:      p_txz01    TYPE    eban-txz01.                       "Short text
    SELECT-OPTIONS: s_creat    FOR     mereq3328-creator_name,           "Creator
                    s_afnam    FOR     eban-afnam,                       "Requester
                    s_lifnr    FOR     eban-lifnr,                       "Desired vendor
                    s_flief    FOR     eban-flief.                       "Fixed Vendor
    SELECTION-SCREEN END OF BLOCK b.
    SELECT objectclas
                 objectid
                 changenr
                 username
                 udate
                 utime
                 tcode
                 change_ind FROM cdhdr
                 INTO TABLE it_cdhdr
                 WHERE objectclas = 'BANF'
                 AND   udate      =  sy-datum .
    SELECT    objectclas
                    objectid
                    changenr
                    chngind
                    tabkey
                    value_new
                    value_old
                    FROM cdpos INTO TABLE it_cdpos
                    FOR ALL ENTRIES IN it_cdhdr
                    WHERE changenr EQ it_cdhdr-changenr AND
                          chngind EQ it_cdhdr-change_ind AND
                          objectclas EQ it_cdhdr-objectclas AND
                          objectid EQ it_cdhdr-objectid.
    IF NOT it_cdhdr[] IS INITIAL.
            SELECT banfn
                   bnfpo
                   bsart
                   statu
                   afnam
                   txz01
                   matnr
                   lifnr
                   ebeln
                   ebelp
                   banpr
                   FROM  eban INTO TABLE it_eban
                   WHERE "banfn = it_cdhdr-objectid
                      banfn IN s_banfn
                     AND bnfpo IN s_bnfpo
                     AND bsart IN s_bsart
                     AND matnr IN s_matnr
                     AND lifnr IN s_lifnr
                     AND flief IN s_flief.
          ENDIF.
    IF NOT it_cdpos[] IS INITIAL.
            SELECT rollname
                   ddtext
                   FROM dd04t INTO TABLE it_dd04t
                   FOR ALL ENTRIES IN it_cdpos
                   WHERE rollname = it_cdpos-fname.

    hi rajeshreddy,
    create one global internal table for the all output fields,
    then move all these fields into this global internal table  and pass into your gird FM.
    i.e. see the below code for reference ,
    loop at <itab> into <wa>.
    read table <itab1> into <wa1> with key <keyfield> = <wa-field>.
    if sy-subrc = 0.
    move-correspondig <wa1> to <globalwa>.
    move-correspondig <wa> to <globalwa>.
    endif.
    then read another <itab2> into <wa2> with key <keyfield> = <wa-field>.
    if sy-subrc = 0.
    move-correspondig <wa2> to <globalwa>.
    endif.
    endloop.
    like this u can move all output fields into one global internal table but u should have relation among all the internal tables.
    reward points if helpful,
    regards,
    seshu.

  • Pls help in this problem

    Dear All,
    We are using SAP B1 2005. We use Purchase Requisition In Purchase Module... In PR ADD- on Report is not generated. PR form there is button Report.. when i click on it. Report Viewer is not working..
    Error message " Load Report Failed ".   Please help in this Issue...

    Hi Arun........
    I guess you are getting rpt file link at the moment of button click.
    I think you are using crystal report through SDK.
    Better you take help of your Technical Person.
    he might be knowing exactly.
    And 2005B is very old version.
    Try to upgrade as soon as possible because SAP has already stopped giving support for 2005....
    Regards,
    Rahul

  • Pls help in this query

    Hi,
    I've needed to print output like below. pls help me out .
    Thanks & Regards,
    Ramana.

    SQL> select '*****'||chr(10)||'****'||chr(10)||'***'||chr(10)||'**'||chr(10)||'*' from dual;
    '*****'||CHR(10)||'
    SQL>

  • HORGUNIT data cant able to delete. Pls help on this.

    Hi BW Experts,
    I am trying to delete the master data from "0ORGUNIT".I have selected by right clicking " Delete master data". It is throwing message as " Not all master data are deleted".I have checked using the TCODE : SLG1 and specified the parameters as RSMD and MS_DEL.
    It is showing that "Master data 89990175 (SID 89990175) is used in /BI0/HORGUNIT and, therefore, not deleted. I hope some data is available in Hierachy table.I dont know how to delete the data from this Characteristic (0ORGUNIT).
    Can u please help on this issue.
    Thanks in advance.
    Thanks,
    Ram.

    Hi Praveen,
    Thanks a lot. Well done.
    Full points assigned.
    Thanks,
    Jelina

  • Query needed urgently.Pls help in this regard

    1.I need to display the details of employee no,name,image if at all an employee is having a photo attached with his profile and their count.
    I need to display the count and the same details for the employees having no photo too.
    I did with a query also.But I need some better Query for performance.I used per_images,per_all_people_f(per_people_f) for the above.Could u suggest me any query relating to this.And moreover,can u suggest any settings need to be done in rdf for the same image to display.
    2.I need to display the approved time sheets between 3 months period.But I used HXC_Timecard_Summary .But in that table thr is no date duration such as time period column.Its having only start time and stop time which will count only for one day and not for a particular duration.SO,could you suggest me the solution for the same.

    Sorry, all my crystal balls are on the blink.
    You couldn't have guarenteed that you won't get your questions answered any better than you have:
    1. Use of the word "Urgent" in your title. To us, your problems aren't any more urgent than anyone else's problems on the forum, and a great deal less urgent than our own problems are!
    2. You have provided zero information on your tables, data, etc in terms of what you're working with and what you want it to look like. You expect us to know your table and data structures in depth ... well, see my initial comment re. my crystal balls.
    3. You say you've come up with a solution for your first point, but haven't provided it, nor do you appear to have done any searching or anything else that makes me think that you're not expecting us to do your work for you.
    I suggest you edit your title to remove the word "urgent" and provide much more detail (table create statements, insert statements, etc) than you have.

  • I need help..so urgent,pls help on this..i accidentally inserted my SD in the cd drive,how can i get it?does it will affect my computer's system?

    in need of help..i accidentally inserted my SD in the cd drive,does it will affect my computer system and function?

    Don't feel bad, you are not alone. Here is a 6 page thread (one of many others) that should be of help: https://discussions.apple.com/thread/2283444?start=0&tstart=0
    Some got them out and others had to take them in for service.

  • PLEASE HELP ME OUT WITH THIS REQUIREMENT VERY URGENT

    HI TO ALL EXPERTS,
    I HAVE AN INTERNAL TABLE IT_EXCEL WITH THREE FIELDS
    SUPPOSE
    ROW COL VAL
    1         1       231
    1         2       001
    NOW I WANT TO MOVE  JUST THAT VAL (COLOUMN)CONTENTS TO ANOTHER INTERNAL TABLE
    FOR EX :
    DATA : BEGIN OF ITAB OCCURS 0,
                    VAL1(4),
                     VAL2(5),
               END OF ITAB.
    NOW THAT ITAB SHOULD HAVE
    VAL1 VAL2
    231     001
    PLEASE ANYONE EXPALIN HOW TO DO IT?
    FULL POINTS FOR CORRECT ANSWER

    HI PABLO,
    IM SENDING THE CODE,
    IM HAVE WRITEN A BAPI FOR MATERIAL SAVE
    I HAVE GOT THE DATA IN EXCEL FILE.
    NOW I WANT TO MOVE THE VALUE COLOUMN OF EXCEL INTERNAL  TABLE TO IT_DATA INTERNAL TABLE
    REPORT  ZBAPI_MATERIAL_SAVEDATA NO STANDARD PAGE HEADING MESSAGE-ID (ZHNC).
    TYPES:BEGIN OF TY_MAT,
           MATERIAL(4),
           IND_SECTOR(1),
           MATL_TYPE(4),
           MATL_GROUP(9),
           BASE_UOM(3),
           BASE_UOM_ISO(3),
           PLANT(4),
           DEL_FLAG(1),
           PUR_GROUP(3),
           BASE_QTY(13),
           PLANT1(4),
           STGE_LOC(4),
           MRP_IND(1),
           SALES_ORG(4),
           DISTR_CHAN(2),
           DEL_FLAG1(1),
           MIN_ORDER(13),
           MAKTX(40),
           LANGU(2),
       END OF TY_MAT.
    DATA: IT_DATA TYPE TABLE OF TY_MAT,
          WA_DATA LIKE LINE  OF IT_DATA,
          WA_DATA1 TYPE TY_MAT.
    *DECLARING WORK AREA  TO BE PASSED TO THE FUNCTION MODULE.
    DATA: BAPI_HEAD LIKE BAPIMATHEAD,
          BAPI_CLIENTDATA LIKE BAPI_MARA,
          BAPI_CLIENTDATAX LIKE BAPI_MARAX,
          BAPI_PLANTDATA LIKE BAPI_MARC,
          BAPI_PLANTDATAX LIKE  BAPI_MARCX,
          BAPI_STORAGELOCATIONDATA LIKE BAPI_MARD,
          BAPI_STORAGELOCATIONDATAX LIKE BAPI_MARDX,
          BAPI_SALESDATA LIKE BAPI_MVKE,
          BAPI_SALESDATAX LIKE BAPI_MVKEX,
          BAPI_MAKT LIKE BAPI_MAKT,
          BAPI_RETURN LIKE BAPIRET2.
    *EXCELAL TABLE TO HOLD THE MATERIAL DESCRIPTION
    DATA: BEGIN OF IT_MAKT.
    INCLUDE STRUCTURE BAPI_MAKT.
    DATA END OF IT_MAKT.
    DATA:BEGIN OF IT_RET.
    INCLUDE STRUCTURE BAPIRET2.
    DATA END OF IT_RET.
    *EXCELAL TABLE TO HOLD HEADER DATA
    DATA: IT_EXCEL TYPE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
    *SELECTION-SCREEN ELEMENTS
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETER: FNAME TYPE RLGRAP-FILENAME OBLIGATORY.
    PARAMETERS: P_BEGCOL TYPE I DEFAULT 1 NO-DISPLAY,
                P_BEGROW TYPE I DEFAULT 1 NO-DISPLAY,
                P_ENDCOL TYPE I DEFAULT 100 NO-DISPLAY,
                P_ENDROW TYPE I DEFAULT 32000 NO-DISPLAY.
    SELECTION-SCREEN END OF BLOCK B1.
    *DECLARATION OF EXCELAL TABLE
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR FNAME.
    PERFORM F_GET_FILE USING FNAME.
    START-OF-SELECTION.
    PERFORM F_XLS_ITAB USING FNAME
                       CHANGING IT_EXCEL.
    PERFORM F_MOVE_DATA.
    *&      Form  F_GET_FILE
          text*
         -->P_FNAME  text*
         <--P_SY_SUBRC  text*
    FORM F_GET_FILE  USING    P_FNAME LIKE FNAME.
    CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
    EXPORTING
       PROGRAM_NAME        = SYST-REPID
       DYNPRO_NUMBER       = SYST-DYNNR
      FIELD_NAME          = ' '*
      STATIC              = ' '*
      MASK                = ' '*
      CHANGING
        FILE_NAME           = P_FNAME
    EXCEPTIONS*
      MASK_TOO_LONG       = 1*
      OTHERS              = 2*
    IF SY-SUBRC <> 0.
    MESSAGE E006(ZHNC).
    ENDIF.
    ENDFORM.                    " F_GET_FILE
    *&      Form  F_XLS_ITAB
          text*
         -->P_FNAME  text*
         <--P_IT_EXCEL  text*
    FORM F_XLS_ITAB  USING    P_FNAME
                     CHANGING P_IT_EXCEL.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      EXPORTING
        FILENAME                      = FNAME
        I_BEGIN_COL                   = P_BEGCOL
        I_BEGIN_ROW                   = P_BEGROW
        I_END_COL                     = P_ENDCOL
        I_END_ROW                     = P_ENDROW
      TABLES
        INTERN                        = IT_EXCEL
    EXCEPTIONS
       INCONSISTENT_PARAMETERS       = 1
       UPLOAD_OLE                    = 2
       OTHERS                        = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO*
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.*
    ENDIF.

  • Pls. help tune this query

    This is the SQL i would like to tune for performace...
    The table structure is given below.
    The table has about 5 million rows.
    On the first day, load_flag has all the rows as 'I'.
    Then from the second day onwards only around 10% of records will be between Load_Start_Time and Load_End_Time. Among these around 40% will have Record_key like 'TP%'. And among those most of the records (95%)will have load_flag as 'U' and a very few (5%) as 'I'. At present there are unique and primary key indexes on record_key. Please advice me whether it's better to go for an index on any of these columns and what type would be better. I thought it would help to have a bit map index on load_flag and a function base index on SUBSTR (RECORD_KEY).
    Also pls. let me know if the order of predicates is right.
    Thanks in advance.
    M_STG_TPDB_TPD_TL_W_PH_LOI_CNTBLTY_STATUS_CE     SQ_STG_TPD_STG_TL_CS_EXTRACTED_RECS_MOD     "SELECT TPD_STG_TL_CS_EXTRACTED_RECS.RECORD_KEY, TPD_STG_TL_CS_EXTRACTED_RECS.DATA_SOURCE, TPD_STG_TL_CS_EXTRACTED_RECS.CONTACTABLE_INDICATOR, TPD_STG_TL_CS_EXTRACTED_RECS.LEGAL_OWNERSHIP_ISSUE_IND, TPD_STG_TL_CS_EXTRACTED_RECS.ADMIN_CONTROL_INDICATOR, TPD_STG_TL_CS_EXTRACTED_RECS.BANKRUPTCY_INDICATOR, TPD_STG_TL_CS_EXTRACTED_RECS.ASSIGNED_INDICATOR, TPD_STG_TL_CS_EXTRACTED_RECS.IN_TRUST_INDICATOR, TPD_STG_TL_CS_EXTRACTED_RECS.DIVORCE_CASE_INDICATOR, TPD_STG_TL_CS_EXTRACTED_RECS.POA_COP_INDICATOR, TPD_STG_TL_CS_EXTRACTED_RECS.SOURCE_EXTRACT_DATE_TIME
    FROM
    TPD_STG_TL_CS_EXTRACTED_RECS
    WHERE
    LOAD_FLAG IN ('I','U')
    AND SUBSTR (RECORD_KEY, 1,2)='TP'
    AND STG_UPDATE_DATE_TIME>'$$Load_Start_Time'
    AND STG_UPDATE_DATE_TIME<='$$Load_End_Time'"
    Table structure
    CREATE TABLE TPD_STG_TL_CS_EXTRACTED_RECS
    RECORD_KEY VARCHAR2(35 BYTE),
    SCHEME_NAME VARCHAR2(50 BYTE),
    ORGANISATION_NAME VARCHAR2(50 BYTE),
    SUPERIOR_TITLE_1 VARCHAR2(50 BYTE),
    TITLE_1 VARCHAR2(50 BYTE),
    FIRST_NAME_1 VARCHAR2(50 BYTE),
    MIDDLE_NAME_1 VARCHAR2(50 BYTE),
    SURNAME_1 VARCHAR2(50 BYTE),
    ADDRESS_LINE_1_1 VARCHAR2(50 BYTE),
    ADDRESS_LINE_2_1 VARCHAR2(50 BYTE),
    ADDRESS_LINE_3_1 VARCHAR2(50 BYTE),
    ADDRESS_LINE_4_1 VARCHAR2(50 BYTE),
    ADDRESS_LINE_5_1 VARCHAR2(50 BYTE),
    ADDRESS_LINE_6_1 VARCHAR2(50 BYTE),
    POST_CODE_1 VARCHAR2(12 BYTE),
    COUNTRY_1 VARCHAR2(50 BYTE),
    OVERSEAS_INDICATOR_1 CHAR(1 BYTE),
    DOB_1 NUMBER(8),
    GENDER_1 CHAR(1 BYTE),
    NINO_1 VARCHAR2(9 BYTE),
    DEATH_INDICATOR_1 CHAR(1 BYTE),
    PRODUCT_HOLDING_ROLE_TYPE_1 VARCHAR2(21 BYTE),
    GONE_AWAY_INDICATOR_1 CHAR(1 BYTE),
    THAMES_LEGAL_OWNERSHIP_IND_1 CHAR(1 BYTE),
    SOURCE_SYSTEM_PARTY_INDV_ID_1 VARCHAR2(15 BYTE),
    SUPERIOR_TITLE_2 VARCHAR2(50 BYTE),
    TITLE_2 VARCHAR2(50 BYTE),
    FIRST_NAME_2 VARCHAR2(50 BYTE),
    MIDDLE_NAME_2 VARCHAR2(50 BYTE),
    SURNAME_2 VARCHAR2(50 BYTE),
    ADDRESS_LINE_1_2 VARCHAR2(50 BYTE),
    ADDRESS_LINE_2_2 VARCHAR2(50 BYTE),
    ADDRESS_LINE_3_2 VARCHAR2(50 BYTE),
    ADDRESS_LINE_4_2 VARCHAR2(50 BYTE),
    ADDRESS_LINE_5_2 VARCHAR2(50 BYTE),
    ADDRESS_LINE_6_2 VARCHAR2(50 BYTE),
    POST_CODE_2 VARCHAR2(12 BYTE),
    COUNTRY_2 VARCHAR2(50 BYTE),
    OVERSEAS_INDICATOR_2 CHAR(1 BYTE),
    DOB_2 NUMBER(8),
    GENDER_2 CHAR(1 BYTE),
    NINO_2 VARCHAR2(9 BYTE),
    DEATH_INDICATOR_2 CHAR(1 BYTE),
    PRODUCT_HOLDING_ROLE_TYPE_2 VARCHAR2(21 BYTE),
    GONE_AWAY_INDICATOR_2 CHAR(1 BYTE),
    THAMES_LEGAL_OWNERSHIP_IND_2 CHAR(1 BYTE),
    SOURCE_SYSTEM_PARTY_INDV_ID_2 VARCHAR2(15 BYTE),
    JOINT_OWNER_INDICATOR CHAR(1 BYTE),
    JOINT_LIFE_TYPE NUMBER(1),
    SAME_ADDRESS_INDICATOR CHAR(1 BYTE),
    TITLE_LA1 VARCHAR2(50 BYTE),
    FIRST_NAME_LA1 VARCHAR2(50 BYTE),
    SURNAME_LA1 VARCHAR2(50 BYTE),
    DOB_LA1 NUMBER(8),
    TITLE_LA2 VARCHAR2(50 BYTE),
    FIRST_NAME_LA2 VARCHAR2(50 BYTE),
    SURNAME_LA2 VARCHAR2(50 BYTE),
    DOB_LA2 NUMBER(8),
    PRODUCT_HOLDING_REF_NUMBER VARCHAR2(28 BYTE),
    PARENT_PRODUCT_HOLDING_REF_NUM VARCHAR2(9 BYTE),
    OCDB_REFERENCE_NUMBER VARCHAR2(17 BYTE),
    BUSINESS_GROUP CHAR(3 BYTE),
    SCHEME_NUMBER VARCHAR2(8 BYTE),
    TRUSTEE_SEQUENCE_NUMBER NUMBER(10),
    MEMBER_NUMBER VARCHAR2(10 BYTE),
    PRSN_ID NUMBER(10),
    OLD_SCHEME_NUMBER VARCHAR2(8 BYTE),
    PUBLIC_SECTOR_INDICATOR CHAR(1 BYTE),
    ELIGIBLE_INDICATOR CHAR(1 BYTE),
    SCHEME_STATUS NUMBER(1),
    SCHEME_TYPE CHAR(2 BYTE),
    Q_DATE_WITH_PROFIT_STATUS NUMBER(1),
    A_DATE_WITH_PROFIT_STATUS NUMBER(1),
    LATEST_WITH_PROFIT_STATUS NUMBER(1),
    NPSW_INDICATOR CHAR(1 BYTE),
    PRODUCT_HOLDING_STATUS CHAR(1 BYTE),
    MATURITY_DATE_OF_CONTRACT NUMBER(8),
    DUE_END_DATE_OF_CONTRACT NUMBER(8),
    OUT_OF_FORCE_DATE NUMBER(8),
    OUT_OF_FORCE_REASON_CODE NUMBER(2),
    DATA_SOURCE VARCHAR2(3 BYTE),
    PRODUCT_TYPE VARCHAR2(30 BYTE),
    PRODUCT_DESCRIPTION VARCHAR2(50 BYTE),
    SERVICING_AGENT_NUMBER VARCHAR2(10 BYTE),
    CONTACTABLE_INDICATOR CHAR(1 BYTE),
    LEGAL_OWNERSHIP_ISSUE_IND CHAR(1 BYTE),
    ADMIN_CONTROL_INDICATOR CHAR(1 BYTE),
    BANKRUPTCY_INDICATOR CHAR(1 BYTE),
    ASSIGNED_INDICATOR CHAR(1 BYTE),
    IN_TRUST_INDICATOR CHAR(1 BYTE),
    DIVORCE_CASE_INDICATOR CHAR(1 BYTE),
    POA_COP_INDICATOR CHAR(1 BYTE),
    DONOR_POLICY_INDICATOR CHAR(1 BYTE),
    TAX_JURISDICTION NUMBER(2),
    INELIGIBLE_DATE NUMBER(8),
    INELIGIBILITY_REASON NUMBER(2),
    A_DATE_CASH_OR_BONUS_TYPE CHAR(1 BYTE),
    VALUATION_APPLICABLE_DATE NUMBER(8),
    A_DATE_PIP_AMOUNT NUMBER(12),
    A_DATE_NPSW_AMOUNT NUMBER(10),
    A_DATE_MINIMUM_APPLIED_AMOUNT NUMBER(10),
    A_DATE_MINIMUM_CALC_AMOUNT NUMBER(10),
    A_DATE_POLICY_VALUE NUMBER(16),
    A_DATE_DATE_PIP_CALCULATED NUMBER(8),
    A_DATE_ALGORITHM_NUMBER NUMBER(2),
    M_DATE_VOTING_VALUE NUMBER(12),
    M_DATE_POLICY_VALUE NUMBER(16),
    E_DATE_CASH_OR_BONUS_TYPE CHAR(1 BYTE),
    E_DATE_PIP_AMOUNT NUMBER(12),
    E_DATE_NPSW_AMOUNT NUMBER(10),
    E_DATE_MINIMUM_APPLIED_AMOUNT NUMBER(10),
    E_DATE_MINIMUM_CALC_AMOUNT NUMBER(10),
    E_DATE_POLICY_VALUE NUMBER(16),
    E_DATE_DATE_PIP_CALCULATED NUMBER(8),
    E_DATE_ALGORITHM_NUMBER NUMBER(2),
    P_DATE_CASH_OR_BONUS_TYPE CHAR(1 BYTE),
    P_DATE_PIP_AMOUNT NUMBER(12),
    P_DATE_NPSW_AMOUNT NUMBER(10),
    P_DATE_MINIMUM_APPLIED_AMOUNT NUMBER(10),
    P_DATE_MINIMUM_CALC_AMOUNT NUMBER(10),
    P_DATE_POLICY_VALUE NUMBER(16),
    P_DATE_DATE_PIP_CALCULATED NUMBER(8),
    P_DATE_ALGORITHM_NUMBER NUMBER(2),
    SOURCE_EXTRACT_DATE_TIME DATE,
    SCHEME_SEQUENCE_NUMBER NUMBER(3),
    LOAD_FLAG CHAR(1 BYTE),
    STG_CREATE_DATE_TIME DATE,
    STG_UPDATE_DATE_TIME DATE
    TABLESPACE TPDBS01A_DATA
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 128K
    NEXT 128K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    LOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;
    CREATE UNIQUE INDEX PK_STG_TL_CS_EXTRACTED_RECS ON TPD_STG_TL_CS_EXTRACTED_RECS
    (RECORD_KEY)
    LOGGING
    TABLESPACE TPDBS01A_DATA
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 128K
    NEXT 128K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOPARALLEL;
    ALTER TABLE TPD_STG_TL_CS_EXTRACTED_RECS ADD (
    CONSTRAINT PK_STG_TL_CS_EXTRACTED_RECS
    PRIMARY KEY
    (RECORD_KEY)
    USING INDEX
    TABLESPACE TPDBS01A_DATA
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 128K
    NEXT 128K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    ));

    I would like to discuss a bit more how a composite index is used. This is not anymore the question of the OP, but I think it will deepen my understanding and maybe that of others as well.
    So we have this situation to start with.
    * A select on two different columns.
    * An index on each column would lead to an INDEX RANGE SCAN because of the where condition.
    * Instead of 2 indexes where only one would be used (not considering bitmap conversions), we add a composite index on both columns.
    * The CBO will choose and access the index.
    Question is: How is this access is done in detail?
    So 400 rows come out of the index range scan.
    This would not be possible if it only scanned one of the two predicates. I agree. The output of the index seem to be only those (400) rows that fit with the where clause on both columns.
    This is supported by the fact that an Index only access is possible when we select only information that is in the index (Oracle 9i output).
    SQL> explain plan for
      2  select record_key
      3  from mytable
      4  where stg_update_date_time >= to_date('2007-11-11','yyyy-mm-dd')
      5  and stg_update_date_time < to_date('2007-11-12','yyyy-mm-dd')
      6  and record_key like 'TP%'
      7  /
    Explained.
    SQL>  select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    | Id  | Operation            |  Name       | Rows  | Bytes | Cost  |
    |   0 | SELECT STATEMENT     |             |   160 |  2400 |     2 |
    |   1 |  INDEX RANGE SCAN    | I1          |   160 |  2400 |     2 |
    Note: cpu costing is off, PLAN_TABLE' is old version
    9 rows selected.
    SQL> Unfortunately I don't see the filter operation, probably because the plan table is old in my system.
    The index is build on columns "stg_update_date_time" and "record_key". So it must access these columns in that order.
    I think, that maybe the range scan is done on the date column and then a further access/filter operation is done to rule out any index entries (leaf nodes) that do not fit with the LIKE 'TP%' expression.
    Since I expect that is is faster to access the data in the index than in the table this should improve performance quite a bit. It is not the same access plan/speed however as with a clause like this:
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    | Id  | Operation                   |  Name       | Rows  | Bytes | Cost  |
    |   0 | SELECT STATEMENT            |             |     1 |   520 |     3 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| MYTABLE     |     1 |   520 |     3 |
    |   2 |   INDEX RANGE SCAN          | I1          |     1 |       |     2 |
    Note: cpu costing is off, PLAN_TABLE' is old version
    10 rows selected.
    SQL> The difference can be seen in the cost estimation.
    I hope somebody does understand what I would like to point at.
    Result of this considerations:
    1) Composite index can be used
    2) The index is used as a range scan on one column and as a filter operation after this access on the second column. This is like an extra select statement inside the index structure.
    3) The resulting table access is as small as possible.
    4) A faster access plan can be achieved when the first column is accessed with direct (unique) scan on the first and a range scan on the second column.
    br Sven
    Message was edited by:
    Sven Weller

Maybe you are looking for

  • Plz Help setting up my Mac g4 with WRT54g. PLEASE!!

    Hey, first let me say that I am brand new to doing anything wireless. Just never had the need for it before and now I am completly lost and havnt a clue what to do or where to go. Here is my situation and what I want to accomplish. First I am not try

  • Open Interactive Reporting report using smartcut

    Hello, i was wondering if i can open an Interactive Reporting report from a link from a separate web server (not workspace). I know i can add username and password to my smartcut link to open my report directly. Is there a way to use encrypted passwo

  • Personal data change in PORTAL (PA30) - need to send mail notification

    Hi, When there is any change in personal data on PORTAL need to send a mail notification to the respective agents. I was able to design the workflow in such a way that , whenever there is any change in the personal data (Ex. Marital status) it trigge

  • Getting list of classes from a jar

    Hi I want to retrieve list of class names from a jar. i used URLClassLoader and it retrieves pakcage name but i don't know how to retrieve class names

  • BEX error on program

    Problem signature:   Problem Event Name: BEX   Application Name: AdvHD.exe   Application Version: 1.2.4.0   Application Timestamp: 53be2874   Fault Module Name: MSVCR90.dll   Fault Module Version: 9.0.30729.6161   Fault Module Timestamp: 4dace5b9   E