Joining 3 tables based on the Value from 1 Table

Dear Oracle Guru's
I have a Table called Resourcemaster , which stores the details of Resources for the project , The Resources can be of 2 types either our own employees as well as Hired Developers from other consultancies. The following is the proposed Resourcemaster table structure
Resourcemaster
Project_id
Resource_ID
Resource_type (E - Employees /H - Hired)
Resource_code
Employeemaster
Emp_code
Emp_Name
Emp_address
Hiredresourcemaster
Hired_code
Hired_Name
Hired_Address
I need to query the resourcemaster , my result should be containing Project id, resource id , Resource type, Resource Name and Resource Address. for which the details are in the above 3 tables . How these 3 tables can be joined and the join is based on the condition, if the resource type is E then resource code = Emp_code from employee master or if the resource type is H then resource_code = Hired_code.
I am not clear how to join them in a single query and i got stuck
Kindly Clarify me
With Warm Regards
ssr

ssr wrote:
I have a Table called Resourcemaster , which stores the details of Resources for the project,So this table should really be called PROJECT_RESOURCES :-)
The Resources can be of 2 types either our own employees as well as Hired Developers from other consultancies. So you have a table called RESOURCES (id [PK], code [UK?], name, address, resource_type [E or H])
And the PROJECT_RESOURCES table is this: (project_id [FK to PROJECTS], resource_id [FK to RESOURCES])
And by modelling your data like this, you'll also find that querying because much easier.
Hope this helps.
Regards,
Rob.

Similar Messages

  • How to get the values from table SKB1 R/3  to SRM

    Hi Gurus,
    My requirement is to get all the values from the table SKB1 to SRM (i.e. in to an internal table) for doing some validation(G/L account XXXXXX requires an assignment to a CO objectXXXXXX.)
    Like wise I have many tables for doing validation in SRM
    Help me how to get this, suggest me any Function module with sample code.
    OR
    Any Standard FM which will give all the values of the fields in the table SKB1 when I pass the key fields G/L account & company code alone so that I can improve the performance.
    Suggest me.
    Regards
    Paul

    Hi,
    You can use the FM 's META_READ_TABLE Or RFC_READ_TABLE
    Which SRM / Backend system version are you using ?
    Are you taking care of the Importing paramater - DELIMITER in this case.. ??*
    See related links ->
    Re: Retrieving data from R/3 into SRM
    Re: Product Search TIME lag
    Else you can just call the remote enabled  FM "BAPI_GL_ACC_GETDETAIL"  from SRM.
    BR,
    Disha.
    Do reward points for useufl answers.

  • Deleting the values from table control

    HI,
    I need to remove the selected line from the Table control on my screen.
    The point is that the Internal table does not have any records,.
    for example in the Customer Create screen,
    while entering the bank details we will enter it in a tbale contraol.
    but the records doesnt exist in the database. but the record gets deleted from the table control only if we press delete button.
    please guide me.
    please note : I want to delete the record from Table Control on the screen and I dont have any corresponding database records..
    regards

    Hi..
    The solution to your problem - deleting values from table control.
    Here: it_wizard is the internal table which is holding the value of table control.
             wa_wizard is the work are of the internal table it_wizard.
             it_delete is the internal table which holds the deleted record of table control.
             wa_delete is the work area of the internal table it_delete
    Also here the field ZSEL is the character field which is used to select the entire record in the table control.
    LOOP AT it_wizard into wa_wizard WHERE zsel = 'X'.
           MOVE-CORRESPONDING wa_wizard TO wa_delete.
           APPEND wa_delete TO it_delete.
           delete table it_wizard from wa_wizard.
    DELETE  FROM zfin_goods WHERE ZFG = WA_delete-ZFG.
    ENDLOOP
    if sy-subrc eq 0.
    Message 'Delete Successful' type 'S'.
    endif.
    The above code will delete the record from both the table control.internal table and the database table.
    I think this will help you to great extent.
    Ward regards,
    Bhuvaneswari
    Edited by: BHUVANESWARI THIRUNAVUKKARASU on Jan 7, 2009 10:39 AM

  • Please help..it's Urgent..How to fetch the value from table row from Page

    Hi,
    I have created a table with 2 LOV's , LOV2 is dependent on LOV2.
    Here I can not use the general Dependent LOV concept, as these values are coming from 2 different LookUps.
    I am not able to fetch the user input for LOV1 (from page) .that is why not able to set the where cluse fro 2nd LOVVO.
    I have used this code:
    if ("ViolationCat".equals(lovInputSourceId)) {
    OAMessageLovInputBean msglov =
    (OAMessageLovInputBean)webBean.findChildRecursive("ViolationCat");
    // String p_violation_category = "'"+(String)msglov.getValue(pageContext)+"'";
    String p_violation_category =
    (String)msglov.getValue(pageContext);
    // System.out.println(" p_violation_category =" +
    // p_violation_category);
    String v_violation_category = "";
    //System.out.println("vcat=" + vCat);
    OAViewObject violationVO =
    (OAViewObject)am.findViewObject("SNI_Violation_DtlsVO2");
    Number vcatViolationIdnum =
    (Number)violationVO.getCurrentRow().getAttribute("ViolationId");
    String vcatViolationId = "" + vcatViolationIdnum;
    pageContext.putTransactionValue("vcatViolationId",
    vcatViolationId);
    pageContext.putTransactionValue("p_violation_category",
    p_violation_category);
    String query =
    " SELECT LOOKUP_CODE, \n" + " MEANING, \n" +
    " LOOKUP_TYPE \n" +
    " FROM apps.fnd_lookup_values \n" +
    " WHERE LOOKUP_TYPE ='SNI_VIOLATION_CATEGORY' AND MEANING=?";
    PreparedStatement ps = txn.createPreparedStatement(query, 1);
    try {
    ps.setString(1, p_violation_category);
    ResultSet rs = ps.executeQuery();
    //System.out.println("before while,");
    // rs.next();
    // v_violation_category = rs.getString("LOOKUP_CODE");
    // System.out.println("v_violation_category="+v_violation_category);
    while (rs.next()) {
    //System.out.println("inside while");
    v_violation_category = rs.getString("LOOKUP_CODE");
    // System.out.println("v_violation_category=" +
    // v_violation_category);
    ps.close();
    } //try ends
    catch (Exception e) {
    e.getMessage();
    //System.out.println("in catch.." + e.getMessage());
    OAViewObject subCatVO =
    (OAViewObject)am.findViewObject("SNI_ViolationSubCategoryVO1");
    //System.out.println("get VO before where clause: subCatVO::"+subCatVO.getQuery());
    subCatVO.setWhereClause("LOOKUP_TYPE like '%SNI_VIOL_SUB_CAT_" +
    v_violation_category + "'");
    System.out.println("after set where clause VO: subCat VO::" +
    subCatVO.getQuery());
    subCatVO.executeQuery();
    // System.out.println("query of subCat VO::" +
    // subCatVO.getQuery());
    //End of sub category Validation
    It is working fine only for the 1st row of teh table.
    I have tried to fetch the value using :
    String violationCategory = (String)violationVO.getCurrentRow().getAttribute("ViolationCategory");
    String violationSubcategory = (String)violationVO.getCurrentRow().getAttribute("ViolationSubcategory");
    But it is fetching null value.
    Please tell me how can I able to fetch the values.

    Hi
    in your scenarion,first u have to identify the particular row of table where the changes is being made ,u have to use this code .when u select the lov ,first it will give the row refernce and then u have to catch the lov event
    OAApplicationModule am =
    (OAApplicationModule)pageContext.getApplicationModule(webBean);
    String event = pageContext.getParameter("event");
    if ("<ItemPPREventName>").equals(event))
    // Get the identifier of the PPR event source row
    String rowReference =
    262
    pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
    Serializable[] parameters = { rowReference };
    // Pass the rowReference to a "handler" method in the application module.
    am.invokeMethod("<handleSomeEvent>", parameters);
    In your application module's "handler" method, add the following code to access the source row:
    OARow row = (OARow)findRowByRef(rowReference);
    if (row != null)
    thanx
    Pratap

  • How to get the values from table region and how to set

    Hi,
    I have a requirement as Seeded Page Having One Table Region having around 8 columns, In That Item Description field is there. My Requirement is I need add one more field for that Region and assign the value depending Item Description.
    I will create one new Item in that region and will give name as Item, But how to set the values to Item Depending on Item Description.
    Is it possible to through CO Extension, If yes..Pls help how to get it.
    Thanks in Advance,
    Hanimi

    Hi Hanimi,
    1. You need to extend the VO, add a new Attribute.
    2. In VORowImpl of the extended VO, you can find the getter for your new attribute (example getItem())
    3. In this getter method you can write some code like:
    if("ABC".equals(getItemDescription())
    return "XYZ" ;
    -Prince
    http://princekapoor82.blogspot.com

  • Input field validation in a Table based on the value of other column

    Hi all
    I have a table with 2 columns. column1 is of text view and  column2 is Input field.
    The user should not be allowed to enter a value  in the column2 ( input field) greater than the value populated in column1(textview).
    So for Eg; if the column1 is populated with value 100, The user should not be able to enter a number greater than 100 in the column2  input field.
    Please let me how this can be achieved.
    I appreciate the help.
    Thanks

    Hi,
    Let me make sure u r working with table control.
    First u have to create a event(VALIDATE) to do the validation.
    Inside the event,
    1. First get the current index where user has pointed the curson
    2. Once u get the index read the internal table with index value.
    3. Now u can compare the col1 and col2 values and populate the error message.
    1. DATA : lo_elt TYPE REF TO if_wd_context_element,
                   l_index type i.
    lo_elt = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).
         CALL METHOD LO_ELT->GET_INDEX( RECEIVING  MY_INDEX = l_index.
    above code should be written inside the event.
    Thanks,

  • Is it Necessary to lock the table while accessing the entries from table

    Hi Gurus,
    While optimization of the Program i came through one type of coding is in  inside the Loop of The internal table  which is processing BDC call transcation through updating the Custom table.
    Before processing the BDC, the Custom table has been locked and read the entries from same custom  table ,if the process fails then it waits for another 20 seconds and retrying the same for another time .I could not able to understand the Logic behind this.if it is not the Correct way then i can straight away remove this Part which is very well improve the perfromance of the Object.
    For Your Better Understanding i have attached the Snippet of the Code .Please find the Code and advice me the same .
    +LOOP AT i_stk_req INTO wa_stk_req.+
    +**  Lock is set to '0',meaning that no lock exist.+
        ++v_lock = 0.    "FALSE.++
    ++*   Preparing variable key for locking.++
        ++CLEAR v_key.++
        ++v_key = sy-mandt.++
        ++v_key+3(3) = wa_stk_req-lgnum.++
        ++v_key+6(4) = wa_stk_req-werks.++
        ++v_key+10(18) = wa_stk_req-matnr.++
        ++v_key+28(10) = wa_stk_req-charg.++
    ++*   Try to lock the row for max of 100 times.++
        ++DO 10 TIMES.++
    ++*     this perform sends sy-subrc EQ 1. in case of foreign lock.++
          +PERFORM enqueue_tab IN PROGRAM saplsvix USING 'ZSDT_STK_REQ'  v_key c_e c_e.+
          +IF sy-subrc EQ 0.          "If Enqueue is successful.+
    +**      set lock as TRUE+
            ++v_lock = 1.  "TRUE++
    ++*       selecting the latest entry for the table(Entry might have changed-refer to++
            +SELECT SINGLE *+
                    ++FROM zsdt_stk_req++
                    ++INTO wa_stk_req++
                   ++WHERE lgnum = wa_stk_req-lgnum++
                     ++AND werks = wa_stk_req-werks++
                     ++AND matnr = wa_stk_req-matnr++
                     ++AND charg = wa_stk_req-charg.++
            ++IF sy-subrc NE 0.        "Checking if select statement was successful++
    ++*         Unlock the table row.++
              ++PERFORM enqueue_tab IN PROGRAM saplsvix USING c_table v_key c_e c_d.++
              ++v_lock = 0.            "If unsuccessful.Then we set lock as FALSE.++
              ++EXIT.++
            ++ENDIF.++
            ++EXIT.++
    ++*     If unsuccessful in locking then wait for 1 sec.++
          +ELSE.+
           +WAIT UP TO 20 SECONDS.+
          +ENDIF.+
    +** exit from DO. ENDDO.+
        ++ENDDO.++
    ++*   v_lock will be FALSE if all attempts for lock was unsuccessful or++
    ++*   if there is a problem in select single after lock.++
        ++IF v_lock = 0.++
          ++NEW-PAGE.++
          ++CLEAR v_display.++
          ++CONCATENATE text-004 text-012 wa_stk_req-matnr text-011 wa_stk_req-werks++
                      ++text-019 wa_stk_req-lgnum text-020 wa_stk_req-charg INTO v_display SEPARATED BY space.++
          ++WRITE :/ v_display.++
        ++ENDIF.++
    ++*   Only to process if lock is successful.++
        ++CHECK v_lock NE 0.++
    ++*   If UPDATE IS FALSE that means that no updates need to be done.++
    ++*   So we set v_update as FALSE in its initial state.++
        ++v_update = 0.++
    ++* Begin of Insert Optima App - 053++
      ++SELECT   lgnum++
               ++lqnum++
               ++matnr++
               ++werks++
               ++charg++
               ++lgtyp++
               ++meins++
               ++verme++
               ++lgort++
               ++qplos++
               ++bestq++
          ++FROM lqua++
          ++INTO TABLE i_lqua1++
         ++WHERE lgnum EQ wa_lqua-lgnum++
           ++AND matnr EQ wa_lqua-matnr++
           ++AND werks EQ wa_lqua-werks++
           ++AND charg EQ wa_lqua-charg++
           ++AND bestq EQ wa_lqua-bestq++
           ++AND lgort EQ wa_lqua-lgort++
           ++AND verme GE 0.++
    ++* End of Insert Optima App - 053++
    ++*   IF a requirement still exists.++
        ++IF wa_stk_req-verme > 0.++
          ++LOOP AT i_lqua INTO wa_lqua WHERE bestq  = 'Q'++
                                      ++AND   qplos  NE 0++
                                      ++AND   lgnum  =  wa_stk_req-lgnum++
                                      ++AND   werks  =  wa_stk_req-werks++
                                      ++AND   matnr  =  wa_stk_req-matnr++
                                      ++AND   charg  =  wa_stk_req-charg.++
            ++CLEAR v_target.++
            ++CHECK wa_stk_req-lgtyp = wa_lqua-lgtyp OR wa_stk_req-lgtyp IS INITIAL.++
    ++*       checking if still some stock needs to be transported.++
            ++IF wa_stk_req-verme < 0.++
              ++EXIT.++
            ++ENDIF.++
    ++*       we need to send the entire lot if the stock belongs to quality inspection++
            ++IF wa_stk_req-verme >= wa_lqua-verme.++
              ++IF wa_stk_req-lgort IS INITIAL.++
    ++*           fetch the Storage location value from the two custom tables.++
                ++PERFORM f_fetch_lgort.++
              ++ELSE.++
                ++v_lgort = wa_stk_req-lgort.++
              ++ENDIF.++
    ++*         checking if v_lgort is not initial.++
              ++CHECK NOT v_lgort IS INITIAL.++
    ++*         Calling QAC2++
              ++PERFORM f_qac2.++
    ++*         Checking if Post Good was successful.++
              +IF NOT wa_qamb-mblnr IS INITIAL.+
               +REFRESH i_lqua1.+
                +SELECT   lgnum+
                         +lqnum+
                         +matnr+
                         +werks+
                         +charg+
                         +lgtyp+
                         +meins+
                         +verme+
                         +lgort+
                         +qplos+
                         +bestq+
                    +FROM lqua+
                    +INTO TABLE i_lqua1+
                   +WHERE lgnum EQ wa_lqua-lgnum+
                     +AND matnr EQ wa_lqua-matnr+
                     +AND werks EQ wa_lqua-werks+
                     +AND charg EQ wa_lqua-charg+
                     +AND bestq EQ wa_lqua-bestq+
                     +AND lgort EQ wa_lqua-lgort+
                     +AND verme GE 0.+
                +SORT i_lqua1 BY lgtyp.+
                +CLEAR: wa_lqua1,+
                       +v_position.+
                +READ TABLE i_lqua1 INTO wa_lqua1 WITH KEY lgtyp = wa_lqua-lgtyp.+
                +IF sy-subrc EQ 0.+
                  +v_position = sy-tabix.+
                +ENDIF.+
                +SELECT SINGLE lgnum+
                               +ubnum+
                          +FROM lubu+
                          +INTO wa_lubu+
                          +WHERE lgnum = wa_lqua-lgnum+
                            +AND mblnr = wa_qamb-mblnr.+
                +CLEAR i_bdcdata.+
                +REFRESH i_bdcdata.+
                +REFRESH i_messtab.+
                +CLEAR wa_bdcdata.+
                +wa_bdcdata-program  = 'SAPML03T' .+
                +wa_bdcdata-dynpro   = '0141' .+
                +wa_bdcdata-dynbegin = 'X' .+
                +APPEND wa_bdcdata TO i_bdcdata .+
                +CLEAR wa_bdcdata .+
                +wa_bdcdata-fnam = 'BDC_OKCODE' .+
                +wa_bdcdata-fval = '/00' .+
                +APPEND wa_bdcdata TO i_bdcdata .+
                +CLEAR wa_bdcdata .+
                +wa_bdcdata-fnam = 'LUBU-UBNUM'.+
                +wa_bdcdata-fval = wa_lubu-ubnum.+
                +APPEND wa_bdcdata TO i_bdcdata .+
                +CLEAR wa_bdcdata .+
                +wa_bdcdata-fnam = 'LUBU-LGNUM'.+
                +wa_bdcdata-fval = wa_lqua-lgnum.+
                +APPEND wa_bdcdata TO i_bdcdata .+
                +CLEAR wa_bdcdata .+
                +wa_bdcdata-fnam = 'RL03T-DUNKL'.+
                +wa_bdcdata-fval = 'H'.+
                +APPEND wa_bdcdata TO i_bdcdata .+
                +CLEAR wa_bdcdata.+
                +wa_bdcdata-program  = 'SAPML03T' .+
                +wa_bdcdata-dynpro   = '0143' .+
                +wa_bdcdata-dynbegin = 'X' .+
                +APPEND wa_bdcdata TO i_bdcdata .+
                +CONCATENATE 'RL03T-SELKZ('+
                            +v_position+
                            +')'+
                      +INTO  v_str.+
                +CLEAR wa_bdcdata .+
                +wa_bdcdata-fnam = v_str.+
                +wa_bdcdata-fval = 'X'.+
                +APPEND wa_bdcdata TO i_bdcdata .+
                +CLEAR wa_bdcdata .+
                +wa_bdcdata-fnam = 'BDC_OKCODE' .+
                +wa_bdcdata-fval = 'BU' .+
                +APPEND wa_bdcdata TO i_bdcdata .+
                +CLEAR wa_bdcdata.+
                +wa_bdcdata-program  = 'SAPML03T' .+
                +wa_bdcdata-dynpro   = '0142' .+
                +wa_bdcdata-dynbegin = 'X' .+
                +APPEND wa_bdcdata TO i_bdcdata .+
                +CLEAR wa_bdcdata .+
                +wa_bdcdata-fnam = 'BDC_OKCODE' .+
                +wa_bdcdata-fval = 'BU' .+
                +APPEND wa_bdcdata TO i_bdcdata .+
    +*......changes as per ticket 44206+
    ++*            CLEAR wa_bdcdata .++
    ++*            wa_bdcdata-fnam = 'LQUAU-KZUAP(01)'.++
    ++*            wa_bdcdata-fval = 'X'.++
    ++*            APPEND wa_bdcdata TO i_bdcdata .++
    +*......end of changes as per ticket 44206+
                +CALL TRANSACTION 'LT05' USING i_bdcdata+
                                        +OPTIONS FROM wa_ctu_params+
                                        +MESSAGES INTO i_messtab.+
    Regards,
    Raja

    hi , please check the link below
    [http://help.sap.com/saphelp_nw70/helpdata/en/41/7af4c5a79e11d1950f0000e82de14a/content.htm|http://help.sap.com/saphelp_nw70/helpdata/en/41/7af4c5a79e11d1950f0000e82de14a/content.htm]

  • How to implement Check box in the Rtf based on the value from XML datafield

    Hello All ,
    It would be great if any one can help me in implementing check box in the rtf based on the data filed value from the XML data.
    I need to get in the out put checked boxes like what we say Radio button Yes or No ( If Yes it should be marked ).
    If any one worked on this please help us...
    Thanks in Advance...

    Did you check the user guide,
    we have a section over there :)
    http://blogs.oracle.com/xmlpublisher/2007/05/22

  • Create table script by passing value from table

    I Have a procedure to check if the table exists, if yes drop and re-create else create table.
    CREATE OR REPLACE
    PROCEDURE test_proc authid current_user
    AS
    v_cnt NUMBER:=0;
    BEGIN
    SELECT COUNT(*)
    INTO v_cnt
    FROM all_tables
    WHERE table_name='T1'
    AND owner = 'WORKSPACE';
    IF v_cnt = 1 THEN
    EXECUTE immediate 'DROP TABLE WORKSPACE.T1';
    END IF;
    EXECUTE immediate 'CREATE TABLE WORKSPACE.T1
    ITM_NBR NUMBER ,
    LCT_NBR NUMBER
    SELECT COUNT(*)
    INTO v_cnt
    FROM all_tables
    WHERE table_name='T2'
    AND owner = 'WORKSPACE';
    IF v_cnt = 1 THEN
    EXECUTE immediate 'DROP TABLE WORKSPACE.T2';
    END IF;
    EXECUTE immediate 'CREATE TABLE WORKSPACE.T2
    LCT_NBR NUMBER(5, 0) NOT NULL ,
    PRY_CD NUMBER(5, 0) NOT NULL )';
    END;
    Requirement: Instead of passing the Owner,tablename & the create table scripts directlyin the query, it should be passed from a database table which will be in given format.
    TableName Query Owner
    T1 CREATE TABLE WORKSPACE.T1(ITM_NBR NUMBER, LCT_NBR NUMBER) WORKSPACE
    T2 CREATE TABLE WORKSPACE.T2(LCT_NBR NUMBER(5, 0) NOT NULL ,PRY_CD NUMBER(5, 0) NOT NULL) WORKSPACE

    user12276240 wrote:
    Excuse all. The database columns are yet to be finalized and every time changes come in we are currently dropping and re-creating the tables which leads in changing the script, hence we are going in for this approach.
    Moreover if i am going to have this script everytime i have to drop and re-create all the tables which can be elimated by this way.So why not have a SQL script as follows?
    drop table emp purge;
    create table emp(
    create index .. on emp( .. );
    ..It drops the existing table (if exists). It then creates the table with constraints and indexes. This script is now the master definition of the table. You can slap a change log header to it. Any changes that needs the table to be redefined and recreated are done via this script. Which means it is also checked into the source code repository as it is part of the code of that system/application.
    I would however remove the drop table from it in case some developer accidentally run it at the wrong time and trash the table.
    The bottom line is that DDL code is part and parcel of the installation, configuration and setup code - and that this is as important as the source code. This code also needs to be "formalised" in proper scripts, checked into SVN/CVS/etc, and used to bootstrap the system (or parts of it), as and when needed.

  • Dynamic selection screen fetching the value from table fields

    hi gurus,
    i have one table say ztable...and i should create a dynamic selection screen which should populate the selection screen by the table field names.
    example..if i have 3 fields im my table..my selection screen should have three selection option fields..and in future if i add one more field in my table it should automatically create another slection-option in selection screen..
    thanks
    Sudheer

    Do you mean like SE16 works. If so, you should notice that if you  amend the selection fields, the screen program is actually re-generated.
    That is what is happening. A program is being created and re-generated.
    To create a dynamic selection screen in a single program is not possible ( I may be wrong ). If it is possible, then you would have problems in defining selection screen field names and using them.

  • Query based report to pick up the value from differences table

    Hi,
    I am trying to pick up the value from change log differences feild but since it is system variable i am unable to pick it.which table i should pick up to get that .
    Regards-
    Monica.

    Hi Monica,
    This would be a tough job if you know the structure of the historical record tables.  You need to familiar with all those A tables first.  Any changes to one of the record would create a instance of the record before change.  AITM is for OITM, AIT1 is for ITM1 etc.  Which tables are you looking for?
    Thanks,
    Gordon

  • How to truncate the values from the table

    Hi All,
    I am working on an issue..where we are first deleting all the records from the table and then based on few conditions we are putting the records back in that table...when we tried to run this program along with few others those who are doing almost the same stuff we are having issues...we tried to schedule few jobs related to these programs only...but after a ceratin amount of time couple of jobs got canceled...I was talking to my basis guy and he said the problem is ratehr then truncating the records from the table we are deleting the records and it's taking lots and lots of space to execute...so we need to truncate the records from the table insted of deleting it...we are using the following the statement right now:
        DELETE FROM ZTUS_PG.
        COMMIT WORK.
    So can you please tell me how can we truncate the values from this table instead of just deleting them and what would be effect of this.
    Thanks,
    Rajeev Gupta

    I don't think basis is saying you should delete all the records from the table. They are saying remove the table and it's contents (a much faster thing to do). I'm not sure this the right thing to do, but you can have a look at:
    http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.apdv.sample.doc/doc/admin_scripts/s-truncate-db2.htm
    Something like:
    EXEC SQL.
      TRUNCATE TABLE ZTUS_PG REUSE STORAGE
    ENDEXEC.
    COMMIT WORK.                      "Empty table is committed here
    Rob
    Edited by: Rob Burbank on Dec 1, 2008 4:06 PM

  • Redirecting to different pages based on value from table linked from report

    Hi,
    I wanted to navigate to different pages from a report link based on a value from the table on which the report is built. I was able to link to particular page without any problem.
    But, I wanted to link to different pages based on value in the table. Please let me know how can I do this?
    Thanks,

    kaminey wrote:
    Hi,
    I wanted to navigate to different pages from a report link based on a value from the table on which the report is built. I was able to link to particular page without any problem.
    But, I wanted to link to different pages based on value in the table. Please let me know how can I do this?APEX version?
    Is this a standard or interactive report?
    How does the value from the table determine the target page used in the link? Is it a page number? Or the result of some computation or process?
    When you have a problem you'll get a faster, more effective response by including as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
    With APEX we're also fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. If you expect a detailed answer then it's appropriate for you to take on a significant part of the effort by getting as far as possible with an example of the problem on apex.oracle.com before asking for assistance with specific issues, which we can then see at first hand.

  • From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    Hi,
    Use NVL or COALESCE:
    NVL (col_a, col_b)
    Returns col_a if col_a is not NULL; otherwise, it returns col_b.
    Col_a and col_b must have similar (if not identical) datatypes; for example, if col_a is a DATE, then col_b can be another DATE or it can be a TIMESTAMP, but it can't be a VARCHAR2.
    For more about NVL and COALESCE, see the SQL Language manual: http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions119.htm#sthref1310
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • How to create a dropdown list to list the values from two different tables?

    Hi,
    I have the following requirement:
    1. I have to create a dropdown list to display all the values from the second column of  a table.
    2. Another dropdown list to display all the values from the second column of another table.
    3. A text box should help me to add the selected values.
    How to get this done in a PDF? Please help.
    Regards,
    Latha

    Is this a LC form? Because Acrobat forms have no concept of tables, just
    individual fields...

Maybe you are looking for