Help plz.... its very urgent... plz

Hi
This is very urgent ….
In a table:
Select * from source_table;
Datagrp_Name Query
DG1 select emp_name,Emp_id from emp (Emp table has emp_name ,emp_id and dept_id)
DG2 select dept_name from dept (dept table has dept_id and deptname)
Column name is: (Datagrp_Name,Query)
There r 2 records in the table
Now I want to load the data in the target table:
Select * from Target;
0 records
desc target; (it has 3 fields)Emp_name (insert the emp_name from emp)
Emp_id ((insert the emp_id from emp)
Dept_name (insert dept_name from dept)
Now I want to load data in this target table from emp and dept
Generally we will use: select emp_name,emp_id,dept_name from emp,dept where e.dept_id=d.dept_id;
But in this case as select query is there in the source table
So, I want the logic how to proceed pa….
Can anyone help me in this/

Hi,
>>But in this case as select query is there in the source table
I think you need to know about EXECUTE IMMEDIATE statement.
take a look below:
SGMS@ORACLE10> create table query (text varchar2(50));
Table created.
SGMS@ORACLE10> insert into query values ('select 1000 from dual');
1 row created.
SGMS@ORACLE10> commit;
Commit complete.
SGMS@ORACLE10> select * from query;
TEXT
select 1000 from dual
SGMS@ORACLE10> set serveroutput on
SGMS@ORACLE10>
SGMS@ORACLE10> begin
  2  declare
  3    sql_cur varchar2(50);
  4    out varchar2(50);
  5  begin
  6    select text into sql_cur from query;
  7    execute immediate (sql_cur) into out;
8 dbms_output.put_line (sql_cur);
9 dbms_output.put_line (out);
10  end;
11  end;
12  /
select 1000 from dual
1000
PL/SQL procedure successfully completed.See if this link below help you:
http://www.dbasupport.com/oracle/ora9i/execute_immediate.shtml
Cheers

Similar Messages

  • Inventory aging report,  plz help me its very urgent

    Hi experts,
    i have a problem in reporting, yesterday i got requirement form uesrs for Inventory Aging report,
    the report fields Contains
    1) Plant
    2) Meterial
    3) Stock as on date( closing stock) with both  fields Quantity & value fields
    4) Average Useage in 6 months  with both fields Quantity & Value
    5) Month on Hand in units
    6)Inventory Aging  30 days with Units and quantity
                               60 days with Units and quantity
                               90 days with Units and Quantity
                               120 days
                                150days
                                 180 days
                                  270 days
                                   365 + days
    we are using bw 3.5 version
    note:  we are u using standard Business Content Cube ( 0IC_C03)  with is coming fron standard Business content DataSources 2Lis_03_BX, 2Lis_03_BF, 2Lis_03_UM
    please suggest me to make this report, please send process in clearly.
    i will assign full points
    Advance thanks,
    Sudheer

    hello Sudheer,
    I remember once creating an Inventory aging document whcih had somwhat the same requirment of going back 6weeks and the other was like 18 weeks from the current week.Do you have cubes regarding the diffrent types of orders, like Planned order, Purchase order, production order and purchase requistion or a multi on top of it.If so then create  query on top of this multiprovider like Inventory aging 30days, inventory aging 60days etc.then  in that query create a variable on calweek (Single value,mandatory and customer exit), this variable should be able to get the current week (depending on when your table was loaded in R3 and if you can get that info thru rfc in BI), this is so that you can determine current week and then specify variable off set in diffrent queries with diffrent requirements of going back, ex: -4 (for 4 weeks ie 1 month) etc, or just create your variable on calmonth and then you need to set an offset just one month back ex -1.
    Create APDs and then load the data in transactional DSOs.Excecute the APD one at a time into the diffrent cubes .Create a multiprovider if you want on top of it.
    Hope this can get you started....
    Krrish

  • Experts plz help its very urgent

    hi expert
    plz help- me
    previously i was getting dump in this statement
    TRANSFER v_tab TO p_file.
    FYI:
    here v_tab is a table which hav som records
    and p_file contains the path of a file like c:\new\ggg.txt
    DATA: v_tab TYPE STANDARD TABLE OF t_line WITH HEADER LINE,
    TYPES: BEGIN OF t_line,
           pspid(9) TYPE c,
           tab1 TYPE x,
           post1 TYPE proj-post1,
           tab2 TYPE x,
           vernr TYPE prps-vernr,
           tab3 TYPE x,
    END OF t_line.
    DUMP I WAS GETTIN :
    For the statement
       "TRANSFER f TO ..."
    only character-type data objects are supported at the argument position
    "f".
    In this case. the operand "f" has the non-character-type "T_LINE". The
    current program is a Unicode program. In the Unicode context, the type
    'X' or structures containing not only character-type components are
    regarded as non-character-type.
    to avoid this dump i used feild symbol
    assign V_TAB to <IN> casting.
          p_file = <in>.
          unassign <IN>.
    nw there is no dump
    but problem is p_file contains the contents of v_tab not the file path .
    plz help me its very urgent
    thanx in advance

    Hey, no probs,
    after your initial declaration, do this.
    TYPES: BEGIN OF n_line,
    pspid(9) TYPE c,
    tab1(15) TYPE c,        "check the length you want
    post1 TYPE proj-post1,
    tab2(15) TYPE c,         "check the length you want
    vernr TYPE prps-vernr,
    tab3(15) TYPE c,         "check the length you want
    END OF t_line.
    DATA: n_tab TYPE STANDARD TABLE OF n_line WITH HEADER LINE.
    now after you fetch data into v_tab,
    move it to n_tab.
    using a loop at v_tab and move corresponding fields to n_tab's work area
    append to n_tab.
    once you have populated n_tab and are ready to TRANSFER.
    OPEN your file using
    open dataset <file> for output in text mode encoding default.
    now
    loop at n_tab.
    TRANSFER n_tab to p_file.
    endloop.
    CLOSE DATASET.

  • Its very urgent:while write code in commend promt i got this below error

    Hi Gurus,
    i am new to oaf.
    Please help me.
    i am trying to deploy oaf page to oracle apps.
    i write the code in cmd promt.
    D:\Jdeveloper\jdevbin\bin>import D:\Jdeveloper\jdevhome\jdev\myprojects\wnsgs\or
    acle\apps\ap\projectnodetailes\webui\ProjectnogetailesPG.xml -username apps -pas
    sword devapps -rootdir D:\Jdeveloper\jdevhome\jdev\myprojects -dbconnection "(DE
    SCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=wimuat1.wind.wnsgroup.net)(PORT=1524))(CO
    NNECT_DATA=(SID=FINDEV)))"
    'import' is not recognized as an internal or external command,
    operable program or batch file.
    plz help me.its very urgent.today is my last day plz plz help me
    Thanks
    Latha

    Hi Gyan,
    import C:\Jdeveloper\jdevhome\jdev\myprojects\exl\oracle\apps\per\ijp\webui\InternalPG.xml -rootdir C:\Jdeveloper\jdevhome\jdev\myprojects -username apps -password apps -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.24.2.18)(PORT=1528))(CONNECT_DATA=(SID=DEV)))"
    before i write this code here go to particular path and write this code.
    here where to go and write this code.
    latha.

  • Regarding tcode j1i2 its very urgent

    hi experts,
    i have problem in tcode j1i2 my invoice number(vbeln) is not coming i'll make my own report with name z try to solve this problem. and also add customer detail and basic value in the report .
    plz help me its very urgent.
    regards if useful.

    i know the program name n name is J_1ISTAX but we are not able to  get the invoice no.  so plz can u check the program n help me.regarding invoice no.(vbeln) n we want to add customer detail n basic value.
    plz try to solve it.

  • Plz help?????????/tell me e-book of recovery manager. its very urgent

    plz help?????????/tell me e-book of recovery manager. its very urgent
    its very urgent

    Satyaki De was asking how to get the ¿ character. I never said it was how you managed to get it. :))
    Satyaki, I have windows Vista on my laptop. It's very pretty but does little more than windows XP as far as interface goes.
    ;)

  • 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

  • Please help me in creating and scheduling jobs. Its very urgent.

    RDBMS: Oracle 9.2.0.4
    OS: win2k
    OWB Client: 9.2.0.2.8
    OWB Repository: 9.2.0.2.0
    Hi,
    I have created a "process workflow" using OWB and deployed it successfully. Now, I would like to schedule this process. I have installed management server and tried to schedule it but all in vain. I am not able to understand anything. I have read "oracle administrator pdf" and couldnt understand anything. Please dont advise me to read any notes or pdf's because I have tried a lot and was not able to figure out the configuration.
    I have a target database named "TARGET". I would like to schedule the workflow process I have created. I am not able to understand preferred credentials and how to execute the XML script generated by the "process workflow". Please help me coz its very urgent.
    -Aditya

    Why dont you try this? I found it after few tries,
    In the create job dialog box
    under General
    for Override Node Preferred Credentials for entire job
    username and password should be the NT or Unix
    login where your Runtime database Server reside.
    under Parameter
    for Override preferred credentials
    username and password should be of your runtime
    repository user
    Regards,
    Shree

  • Encrypting and Decrypting Data(Its Very Urgent, Please Help.)

    Hi,
    Can anyone tell me some idea in the below mentioned details.
    Iam creating a Function for Encrypting and Decrypting Data Values using
    DBMS_OBFUSCATION_TOOLKIT with UTL_RAW.CAST_TO_RAW by using
    Key Value as normal.
    But the problem, is it possible to have the key value more than 8.
    Its showing me error when i give the key value less than 8 or more than 8.
    Can u tell me why it happens, is that the limit of the key value or is any other way to do that.
    Its Very Urgent, Please Help.
    Thanks,
    Murali.V

    Is this what you're looking for?
    Usage Notes
    If the input data or key given to the DES3DECRYPT procedure is empty, then the procedure raises the error ORA-28231 "Invalid input to Obfuscation toolkit."
    If the input data given to the DES3DECRYPT procedure is not a multiple of 8 bytes, the procedure raises the error ORA-28232 "Invalid input size for Obfuscation toolkit." ORA-28233 is NOT applicable for the DES3DECRYPT function.
    If the key length is missing or is less than 8 bytes, then the procedure raises the error ORA-28234 "Key length too short." Note that if larger keys are used, extra bytes are ignored. So a 9-byte key will not generate an exception.
    C.

  • Its very urgent:How to insert data one table to another table

    Hi all,
    i am very new to oaf.
    i have employee_number(per_all_people_f) lov is there.once select the employee number and click on the submit button
    what ever select the employee number it ll move to new_operation_manager in custom table.
    plz help me how to move.
    its very urgent.
    Thanks
    Latha.
    Edited by: Latha on Dec 21, 2011 9:33 PM

    Hi Gyan,
    Sorry, i will not repate.how to close the thread.
    Gyan i have no knowledge on this issue.
    plz help me.and where to mention,data is which table to insert.
    plz send one sample code.
    its very urgent gyan.
    i wrote the am,co codes
    in am:
    public void NewoperationManagerLogic()
    ManagerCustomTableVOImpl vo1=getManagerCustomTableVO1();----> here which vo take
    OADBTransaction oadbt=getOADBTransaction();
    if(!vo1.isPreparedForExecution())
    vo1.executeQuery();
    Row row=vo1.createRow();
    vo1.insertRow(row);
    in Co processrequest:
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    ManagerInformationAMImpl am=(ManagerInformationAMImpl)pageContext.getApplicationModule(webBean);
    am.invokeMethod("NewoperationManagerLogic");
    in co processform request:
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    if(pageContext.getParameter("Submit")!=null)
    ManagerInformationAMImpl am=(ManagerInformationAMImpl)pageContext.getApplicationModule(webBean);
    am.getOADBTransaction().commit();
    throw new OAException("Records Saved Sucessfully",OAException.INFORMATION);
    thanks
    latha
    Edited by: Latha on Dec 22, 2011 1:26 AM

  • Error while Costing Run   ---  Its very Urgent.

    Hi Peers
    When i ran the Standard cost for a material which is an external procured part, the system is showing an error message "Cost component split costed with value of zero" I checked the Moving Price for the material its not zero. Plz let me know what could be the problem. Its very urgent. Plz help.
    Regards
    Rajaram

    Hello,
    There can be so many reasons for this issue, system is not able to find any of the given option given in valuation variant which is linked to costing variant OKKN. Check the options given in valuation variant, it  must be pick from material master planning price1 or planning price 2 or info record price or pick the existing standard price. When system fails in any of these strategies its pops up the message you described.
    Maintain  price in material master fields or create info record for this material
    thanks
    Megha

  • Calling java from pl/sql in oracle 10g?its very urgent.

    Hi Friends,
    i hve simple java code:
    class Hell
    public static String Hello()
    return"hello world";
    & compile this code using javac & loaded Hell.class in to database using this command
    c:\>loadjava -user chandru/shekar@pulser c:\Hell.class
    & i wrote pl/sql like:
    CREATE OR REPLACE FUNCTION Hell RETURN String as language java name 'Hell.Hello() return java.lang.String';
    i will compile the code & run but at that time this error i am getting:
    ORA-29516: Aurora assertion failure: Assertion failure at eox.c:317
    Uncaught exception System error: java/lang/UnsupportedClassVersionError
    I am using oracle 10g.Plzzzzzzzzz help me.Its very important to for me.
    Is any path i hve to set for oracle 10g database.Plz any one help me.
    regards
    shekar

    Hello here is how I solved the problem
    Let us assume that i try to load the file Hello.Java into the user scott.
    public class Hello {
         public static String world() {
              return "hello world";
    1) Dropjava          
    You must drop the java class if you already have loaded the class onto the server.
    dropjava -u scott/tiger Hello.class
    2) load class on server and let the server compile the source code.
    It is necessary to compile the source code on the server when the server and the local machine have different Java versions. To check which Java version there is running on the client machine open a command prompt and write Java -version
    loadjava -user scott/tiger -resolve Hello.java
    3) Publish stored procedure      
    sqlplus scott/tiger@oracle
    CREATE OR REPLACE FUNCTION helloworld RETURN VARCHAR2 AS                LANGUAGE JAVA NAME 'Hello.world () return java.lang.String';
    4)Call stored procedure      
    VARIABLE myString VARCHAR2(20);
    CALL helloworld() INTO :myString;
    PRINT myString;
    RGDS
    Thomas Winterberg

  • Need help in Idoc--very urgent.

    Hi guys,
    i am working on an object where i need to post the data from legacy system to F-27 transaction using Idoc.i hv found two idocs input_idoc_fidcc1 and input_idoc_fidcc2 for posting the data..
    Can anyone help in finding the right idoc for triggering the f-27 transaction with the reason...
    coz both are perfoming almost the same functionalities...
    its very urgent guys..
    kindly help me full marks wud be given...
    regards
    Sahil

    Hi,
    The function module is related to post the idoc type FIDCPP01
    and posts the complete FI document. and as coming to second function module along with Tax you can post item wise with holding tax dataalso. So you choose the required function module based on the data you need to post. If you need not post with holding tax details dont fo for second function modules.
    Reward if find useful

  • How to enable RFC and how to use it in Report..please tell its very urgent

    Dear Techie's,
    Please tell its very urgent..
    How to enable RFC and how to use it in Report. ??
    Virendra

    hi,
    pls chk any of these links.
    http://help.sap.com/saphelp_46c/helpdata/en/9b/417f07ee2211d1ad14080009b0fb56/frameset.htm
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    Checkout !!
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    http://techrepublic.com.com/5100-6329-1051160.html#
    http://www.sap-img.com/bapi.htm
    http://www.sap-img.com/abap/bapi-conventions.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    http://www.sapgenie.com/abap/bapi/example.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
    rgds
    Anver

  • Its very urgent:how to insert data into database tables

    Hi All,
    I am very new to oaf.
    I have one requirement data insert into database tables.
    here createPG having data that data insert into one custom table.
    but i dont know how to insert data into database tables.
    i wrote the code in am,co as follows.
    in am i wrote the code:
    public void NewoperationManagerLogic()
    ManagerCustomTableVOImpl vo1=getManagerCustomTableVO1();
    OADBTransaction oadbt=getOADBTransaction();
    if(!vo1.isPreparedForExecution())
    vo1.executeQuery();
    Row row=vo1.createRow();
    vo1.insertRow(row);
    in createPG processrequest co:
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    ManagerInformationAMImpl am=(ManagerInformationAMImpl)pageContext.getApplicationModule(webBean);
    am.NewoperationManagerLogic();
    process form request:
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    if(pageContext.getParameter("Submit")!=null)
    ManagerInformationAMImpl am=(ManagerInformationAMImpl)pageContext.getApplicationModule(webBean);
    am.getOADBTransaction().commit();
    please help with an example(sample code).
    its very urgent.
    thanks in advance
    Seshu
    Edited by: its urgent on Dec 25, 2011 9:31 PM

    Hi ,
    1.)You must have to create a EO based on custom table and then VO based on this EO eventually to save the values in DB
    2.) the row.setNewRowState(Row.STATUS_INITIALIZED); is used to set the the status of row as inialized ,this is must required.
    3.) When u will create the VO based on EO the viewattributes will be created in VO which will be assigned to the fields to take care the db handling .
    You must go thtough the lab excercise shipped with you Jdeveloper ,there is a example of Create Employee page ,that will solve your number of doubts.
    Thanks
    Pratap

  • Getting the tablespace name(its very urgent)

    Hi,
    Can anyone help me to get the query to find the tablespace used by the users in the database
    Its Very urgent please
    Thanks,
    Murali.V

    @Murali,
    ...the tablespace used by the users...What did you mean exactly ?
    Default tablespace doesn't say that user cannot create a table in an other tablespace.
    You can see what tablespace are used by the user's segments :
    SQL> select default_tablespace
      2  from user_users;
    DEFAULT_TABLESPACE
    PSDEFAULT
    SQL> select tablespace_name, count(*)
      2  from user_segments
      3* group by tablespace_name
    SQL> /
    TABLESPACE_NAME                  COUNT(*)
    AAAPP                                 102
    AALARGE                                 4
    ADAPP                                 429
    AMAPP                                   2
    [...]@Talifhani,
    SELECT tablespace_name FROM dba_tablespaces; This give all tablespace from database.
    Nicolas.

Maybe you are looking for

  • Multiple screens in infotype.

    Hi, i've seen that exists infotype with multiple screens (for example screen 2001, 2002, 2003), how is established which screen must be displayed when a user would create the infotype? How is implemented the table t588m? Thanks for answers.

  • How do you get the iPhone 4 camera to take larger pictures?

    GSM Model is the AT&T one? Just want to make sure I'm in the right spot. I have an AT&T iPhone 4. Well I notice that when I take photos and I laod them on my computer to color correct them or whatever, they are a very small size (11x8 @ 72dpi) Obviou

  • My usb port doent work after I plug in my xbox rock candy controller

    Hello So recently I've gotten the blue screen of death on my computer for some reason on this horide laptop and then it shuts down. Afterwards when I turn on the computer the usb port were responsive for a short while before they stop working. The so

  • How to call a procudure (has collection as one of the parameters) from java

    Hi I have written a PL/SQL procedure. One of the parameters of the procedure is a collection. Could you please tell me how to call this procedure from java. Regards

  • Photoshop CS4 and Photoshop CS4 Extended trial version

    Hello, I have Photoshop CS4 installed on my Windows Vista system and wanted to download the Photoshop CS4 Extended trial. I tried to download the Photoshop CS4 Extended trial on the desktop as well as on the laptop and wasn't successful. I was able t