How to pass Temp variable value instead of Table name in From clause.

Hi,
I have an requirement to pass the Temperorary variable value instead of Table name in FROM Clause in SQL.
But I am strugglint to pass this variable value.
E.g., a Varchar2(5) := 'aa';
Select * from a;
Here I come to mention a - 'aa'. But the SQL looks for 'a' as Table. But its should look into 'aa' as Table name.
Kindly guide me.
Thanks.

SQL> declare
  a     varchar2 (5) := 'emp';
  v     varchar2 (100);
  cur   sys_refcursor;
begin
  open cur for 'Select ename from ' || a;
  fetch cur into v;
  while cur%found
  loop
    dbms_output.put_line (v);
    fetch cur into v;
  end loop;
  close cur;
end;
JAMES
SCOTT
SMITH
ALLEN
WARD
JONES
MARTIN
BLAKE
CLARK
KING
TURNER
ADAMS
FORD
MILLER
PL/SQL procedure successfully completed.

Similar Messages

  • How to  pass a variable value into a custom planning function via a web

    Can some one tell me
    How to  pass a variable value into a custom planning function via a web template?
    What are the different types of Planning function parameters available and what is the difference between them?
    Thanks
    babu

    Hi Sutrtha,
    Yeah I got the pop up asking to select the variables used, I have selected ENTITY_ID that was used by the interfaces, but on execution of the package the Scenario did not work as the passeed variable #ENTITY_ID is set to 0 instead of the value I am passing.
    Am I missing something?
    Regards
    B

  • How to pass session variable value with GO URL to override session value

    Hi Gurus,
    We have below requirement.Please help us at the earliest.
    How to pass session variable value with GO URL to override session value. ( It is not working after making changes to authentication xml file session init block creation as explained by oracle (Bug No14372679 : which they claim it is fixed in 1.7 version  Ref No :Bug 14372679 : REQUEST VARIABLE NOT OVERRIDING SESSION VARIABLE RUNNING THRU A GO URL )
    Please provide step by step solution.No vague answers.
    I followed below steps mentioned.
    RPD:
    ****-> Created a session variable called STATUS
    -> Create Session Init block called Init_Status with SQL
        select 'ACTIVE' from dual;
    -> Assigned the session variable STATUS to Init block Init_Status
    authenticationschemas.xml:
    Added
    <RequestVariable source="url" type="informational"
    nameInSource="RE_CODE" biVariableName="NQ_SESSION.STATUS"/>
    Report
    Edit column "Contract Status" and added session variable as
    VALUEOF(NQ_SESSION.STATUS)
    URL:
    http://localhost:9704/analytics/saw.dll?PortalGo&Action=prompt&path=%2Fshared%2FQAV%2FTest_Report_By%20Contract%20Status&RE_CODE='EXPIRED'
    Issue:
    When  I run the URL above with parameter EXPIRED, the report still shows for  ACTIVE only. The URL is not making any difference with report.
    Report is picking the default value from RPD session variable init query.
    could you please let me know if I am missing something.

    Hi,
    Check those links might help you.
    Integrating Oracle OBIEE Content using GO URL
    How to set session variables using url variables | OBIEE Blog
    OBIEE 10G - How to set a request/session variable using the Saw Url (Go/Dashboard) | GerardNico.com (BI, OBIEE, O…
    Thanks,
    Satya

  • How to pass a Variable value into an ODI Scenario from ODI Package

    I have created an Interface that uses the variable #ENTITY_ID for retrieving entity data from the DWH; now I have generated a Scenario from the interface and placed the Scenario in an ODI Package; am not sure how to pass the #ENTITY_ID variable to the ODI Scenario?
    Any help is greately appreciated.
    Best Regards
    Bee

    Hi Sutrtha,
    Yeah I got the pop up asking to select the variables used, I have selected ENTITY_ID that was used by the interfaces, but on execution of the package the Scenario did not work as the passeed variable #ENTITY_ID is set to 0 instead of the value I am passing.
    Am I missing something?
    Regards
    B

  • How to pass the  variable value to reports as a parameter

    hi
    i have facing a problem that i want to pass the value of a variable that i had calculate in a procedure like
    SELECT nvl(BASIC_PAY,0) INTO v_basic FROM EMP WHERE EMP_ID=P_EMP_ID;
    so i want to send the variable value v_basic as a parameter through form to report...and simlarly other variables values which i have calculate in procedure....
    need ur help to solve this problem
    thanks in advance

    it's the exact posting from your last post. Please don't duplicate the postings, so that we can help you in one thread and not so many different threads

  • How to pass Presentation Variable Value from Main Report to Detail Report

    Hello,
    I've 2 reports that is attached to each other. In my main report i've several report prompts and i am using i"s prompted" on my detail report to attach them.
    But 2 of my report prompts are presentation variables(Names : FIRST, SECOND). Both are in date format. I've a filter in my main report like;
    "ASSIGNMENTS_F"."EFFECTIVE_START_DATE" BETWEEN @{FIRST} AND {SECOND}
    It works fine when i run the main report. But when i click on the numbers, i see that i can not filter my detail report with the chosen values for 2 presentation variables. It just shows all the dates.
    I've tried adding both presentation variables in both reports as columns and adding 'is prompted' filter to them. But did not work either.
    I just cant pass the written values for presentation variable prompts to detail report..
    Please help :)

    Hi,
    What you can try is refer the filte condition in the main report to the detailed report with the option--> Filter based on another request.
    Or you try creating another intermediate report which will refer the main report filters and pass the filters to the detailed report.
    Hope this helps.
    Regards
    MuRam

  • How to pass characterstic variable value using button in sap wad

    Hello Gurus,
    I have one requirement in WAD 7.0.i have made one user input characterstic variable in Bex i.e on 0calmonth.Now i have passed the same variable in WAD drop down button.Now suppose based on the logic on that variable which i have made in bex is like when i select 04.2010 in drop down button it dispalys data for next three months.
    Now my user wants same thing to be displayed with the help of button as well. I need to make two buttons one for previous month and other for next month.I made two button using button group and passed that variable also but data is not changing.
    How to get the desired output using buttons.
    I want two buttons like this <<(previous) >>(next) and i want to pass that same variable which i passed in drop down button and when i press previous button it should display last month data and when i press next it should display next month data.
    How to achieve this in WAD with the help of buttons.Give me your useful suggestions.
    Hope my requirement is clear.
    Thanks in advance
    Regards,
    AL

    Need your valuable suggestions on this...

  • How to pass line item values in the table paramer of FM

    Hi all,
    When i will give the import of  the FM as VBELN"sales order number.
    I want to display all the line items for "PO Quantity in the out put of the FM.
    For this i thnk i have to pass the line item values in the table parameter of the FM.
    Can any body please tell me how to pass the values for the line items in the table parameter fo teh FM.
    Please give a example.
    Thanks

    Sub pLoopThroughPivotFields()
    Dim oItem As Excel.PivotItem
    Dim oField As Excel.PivotField
    Set oField = ThisWorkbook.Worksheets("Sheet1").PivotTables("Pivot Table name").PivotFields("field name")
    For Each oItem In oField.PivotItems
    oField.CurrentPage = oItem.Name
    'Put your copy code here
    DoEvents
    Next oItem
    End Sub
    Felipe Costa Gualberto - http://www.ambienteoffice.com.br

  • How to pass pageFlowScope variable value as bind variable for VO

    Hi,
    I have one fixed lov (not based on datasource), if i select any value in that lov i want to pass this value to a pageFlowScope variable.
    After this i want to use this value as bind variable for VO. whenever the vo executes thereafter this bind variable should filter that vo results.
    My jdev version: 11.1.0.0
    Thanks in advance,
    SAN

    san-717,
    can you elaborate on the use case instead of the implementation you don't get done? I understand you have data displayed in a tree: so lets assume the tree structure is Locations, Departments and Employees according to the Oracle HR sample schema.
    1. What is the LOV supposed to do ?
    2. Where is the LOV located ?
    3. What values does the LOV show ?
    4. Is the LOV a select choice component or a real LOV (with search dialog)
    5. Where is the bind variable used ?
    To me it sounds like you want to filter the tree data based on the select choice value. However, you wont do this by passing the bind parameter to all View Objects involved as they may not have the attribute in their query. So your use case is important to answer the question
    Frank

  • How to pass  JavaScript variable value throuh netui form ??

    Hi All,
    I have reqmnt,where in I need to pass the value from JavaScript function through
    Form submission.
    I could able to pass this through simple HTML form using SIMPLE HTML tags. How
    can i do the same thing using NETUI tag (NETUI form)??
    Can somebody throw some input on this??
    TIA,
    RAM.

    Excellent - Thats what I was also looking.
    RAM.
    Thomas Cook <[email protected]> wrote:
    >
    Here's an example of what I think you're trying to do:
    <netui:html>
    <body>
    <netui:form action="submitIt" tagId="myForm">
    <netui:button value="Submit It" onClick="return setFormValue()"/>
    <script>
    function setFormValue()
    var form = document.getElementById( getNetuiTagName( "myForm",
    this ) );
    var newVal = document.createElement( "input" );
    newVal.type = "hidden";
    newVal.name = "foo";
    newVal.value = "bar";
    form.appendChild( newVal );
    return true;
    </script>
    </netui:form>
    </body>
    </netui:html>
    Thomas
    RAMt wrote:
    Hi All,
    I have reqmnt,where in I need to pass the value from JavaScript functionthrough
    Form submission.
    I could able to pass this through simple HTML form using SIMPLE HTMLtags. How
    can i do the same thing using NETUI tag (NETUI form)??
    Can somebody throw some input on this??
    TIA,
    RAM.
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
    <title></title>
    </head>
    <body>
    Here's an example of what I think you're trying to do:<br>
    <br>
    <tt><nobr><netui:html></nobr><br>
    <nobr>  <body></nobr><br>
    <nobr>    <netui:form action="submitIt" tagId="myForm"></nobr><br>
    <nobr>    <netui:button value="Submit It" onClick="return
    setFormValue()"/></nobr><br>
    <nobr>    <script></nobr><br>
    <nobr>      function setFormValue()</nobr><br>
    <nobr>      {</nobr><br>
    <nobr>          var form
    = document.getElementById( getNetuiTagName(
    "myForm", this ) );</nobr><br>
    <nobr>          var newVal
    = document.createElement( "input" );</nobr><br>
    <nobr>          newVal.type
    = "hidden";</nobr><br>
    <nobr>          newVal.name
    = "foo";</nobr><br>
    <nobr>          newVal.value
    = "bar";</nobr><br>
    <nobr>          form.appendChild(
    newVal );</nobr><br>
    <nobr>          return true;</nobr><br>
    <nobr>      }</nobr><br>
    <nobr>    </script></nobr><br>
    <nobr>    </netui:form></nobr><br>
    <nobr>  </body></nobr><br>
    <nobr></netui:html></nobr></tt><br>
    <br>
    Thomas<br>
    <br>
    RAMt wrote:
    <blockquote cite="[email protected]" type="cite">
    <pre wrap="">Hi All,
    I have reqmnt,where in I need to pass the value from JavaScript function
    through
    Form submission.
    I could able to pass this through simple HTML form using SIMPLE HTML
    tags. How
    can i do the same thing using NETUI tag (NETUI form)??
    Can somebody throw some input on this??
    TIA,
    RAM.
    </pre>
    </blockquote>
    </body>
    </html>

  • How to pass a variable value to an inner class?

    Hi there,
    Please have a look of the code below. It's a bit long, but my concern is I did have to declare the int "i" variable as static because it is used by an inner class (if "i" is not declare as static, the code cannot be compiled).
    Is there a more "clean" way to do the way work without declaring the "i" int as static? (because the scope of this variable is not the whole program).
    Thanks for your help.
    Denis
    import java.util.*;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    class Tools{
         static int i;
         static void longTask(){
              for (Tools.i=0; Tools.i<=100; Tools.i++) {
                   SwingUtilities.invokeLater( new Runnable(){
                        public void run(){
                             myApp.jpb.setValue(Tools.i);//--- static variable i
                   for (int j=0; j<200; j++)
                        System.out.println(Tools.i+" - "+j);
    class myListener implements ActionListener{
         public void actionPerformed(ActionEvent e){
              Thread t = new Thread() {
                   public void run(){
                        Tools.longTask();
              t.start();
    public class myApp {
         static JProgressBar jpb;
         public static void main(String[] args) {
              JFrame frame = new JFrame();
              JPanel panel = new JPanel(new FlowLayout());
              jpb = new JProgressBar();
              jpb.setValue(0);
              jpb.setStringPainted(true);
              JButton button = new JButton("go");
              button.addActionListener(new myListener());
              panel.add(jpb);
              panel.add(button);
              frame.getContentPane().add( panel, BorderLayout.CENTER);
              frame.setVisible(true);
              frame.pack();
    }

    Without compiling it, writing it in notepad, it would be something like this. You should also wonder if this longTask has to be static by the way. But I think this demonstrates the inner class stuff. You can also look in the tutorial on this site: http://java.sun.com/docs/books/tutorial/essential/threads/timer.html
    class Tools{
         static int i;
         static void longTask(){
              for (Tools.i=0; Tools.i<=100; Tools.i++) {
                   SwingUtilities.invokeLater( new Innerclass(i));
                   for (int j=0; j<200; j++) {
                        System.out.println(Tools.i+" - "+j);
         Class Innerclass implements Runnable(){
              int i;
              public Innerclass(int i) {
                   this.i = i;
              public void run(){
                   myApp.jpb.setValue(Tools.i);//--- static variable i
    }

  • How to pass a variable value in message area

    hi
    i have a requirement in which i need to display a table with records and below it in a message area i need to display the total no. of records found ( eg : 2 records found )
    am using message manager for the display and calculating the total no of rows by lv_index = LINES( li_table ) .
       get message manager
      DATA lo_api_controller     TYPE REF TO if_wd_controller.
      DATA lo_message_manager    TYPE REF TO if_wd_message_manager.
      lv_index = LINES( li_table ).
      lo_api_controller ?= wd_this->wd_get_api( ).
      CALL METHOD lo_api_controller->get_message_manager
        RECEIVING
          message_manager = lo_message_manager
      report message
      CALL METHOD lo_message_manager->report_warning
        EXPORTING
          message_text             = '& records found' WITH lv_index
    BUT this throws an error. ... can anyone please provide the correct coding for this.
    Thanks
    Anurupa.

    Hi Anurupa,
                  If u want just a message to come in the message area without warning or error . U can use method 'report_success'.
    get message manager
    DATA lo_api_controller TYPE REF TO if_wd_controller.
    DATA lo_message_manager TYPE REF TO if_wd_message_manager.
    lv_index = LINES( li_table ).
    lo_api_controller ?= wd_this->wd_get_api( ).
    CALL METHOD lo_api_controller->get_message_manager
    RECEIVING
    message_manager = lo_message_manager
    report message
    CALL METHOD lo_message_manager->report_success
    EXPORTING
    message_text = '& records found' WITH lv_index

  • How to pass multiple selected values of a table to RFC

    Hi all,
    My scenerio is that user selects multiple rows and click a button. i want to pass a unique id of the row to rfc.
    means there are userid is unique in the table.
    i want to paas the userids of all the selected rows to rfc.
    Can any one help me to implement that??
    regards
    Anoop

    Hi
    In the context view the properties of the model node for which you have to pass the table data.
    In the properties you will find a property called Structure from where you can get the structure name..in my example scenario the structre name is
    Zdp_Str_Shopping_Cart
    After adding all the datas to the model node, finally add that instance to the root node....
    You want to pass only the selected data in the table right, for that refer the looping concept suggested by of Ayyapparaj KV
    Zdp_Str_Shopping_Cart shoppingCart;
    for(int i=0;i<wdContext.nodeChnIt_Shopping_Cart().size();i++)
                   shoppingCart = new Zdp_Str_Shopping_Cart();
                   shoppingCart.setEquipment_No(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getEquipment_No());
                   shoppingCart.setIbase(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getIbase());
                   shoppingCart.setKbetr(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getKbetr());
                   shoppingCart.setMaktx(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getMaktx());
                   shoppingCart.setMatnr(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getMatnr());
                   shoppingCart.setQuantity(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getQuantity());
                   shoppingCart.setSerial_No(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getSerial_No());
                   shoppingCart.setUnit(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getUnit());
                   shoppingCart.setUnit_Of_Wt(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getUnit_Of_Wt());
                   shoppingCart.setWaers(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getWaers());
                   shoppingCart.setWeight(wdContext.nodeChnIt_Shopping_Cart().getChnIt_Shopping_CartElementAt(i).getWeight());
                   createProductOrder.addIt_Shopping_Cart(shoppingCart);           
              wdContext.nodeZdp_Bapi_Create_Product_Order_Input().bind(createProductOrder);
    Let me know whether you got an idea and your problem get solved......
    Regards
    Chandran S

  • How to set a variable value on the BPC Data Manager

    Hello BPC Experts,
    I'm creating a BPC10 NW version demo environment for our prospect customer.
    I made a data manager to import  BW data into BPC model from BW cube.
    I need to import just one month data into BPC from the BW cube that has more than one month data.
    When I run the data package manually, I can select a member of the time dimension prompt and I can import specific month data I want.
    But, in a case where the program (data manager) runs by JOB monthly,
    I can't select a member of the time dimension prompt manually.
    So I want to know how to set a  variable value to the time dimension prompt from a system date etc. automatically.
    Are there any way to set a variable value to the time dimension prompt on the data manager automatically from a system date?
    Or, do you have any other solution to import just one month data into BPC from the BW cube that has more than one month data  by the data manager running on JOB ?
    (without selecting a member of the time dimension prompt of the data package manually)
    Thanks in advance,
    Keisuke

    Hi Gersh
    Sorry for my late reply and thanks for your helpful information.
    I tried the second way of your information and I could configure it.  
    And I 'll try first way of your information.
    Regards,
    Keisuke

  • How to pass a variable more than one values?

    How to pass a variable more than one values?

    You can't.
    During 1 session, 1 ODI variable can have only 1 value at a time.
    If you need more than 1 value, you will have to do somethink like a loop inside your package, and refresh the variable value each time.

Maybe you are looking for

  • Tempo grid not related audio regions

    So I'm feeling stupid - I'm working on a sound design which uses only human voices. I've placed tons of samples into the arrange window, found an order I like for some of them and now want to align with them with the beginnings of bars related to the

  • How to use same DFF for two different forms with :BLOCK.field reference

    Hi, Can anyone suggest how to use the same dff in two different forms by using :BLOCK.field reference. Scenario is the same DFF is referenced by two forms, viz. Form-1 & Form-2. Form-1 Reference Field is :BLOCK.field name, but the same block is not a

  • Connecting to someones computer

    Does any body know if its possible to share other peoples files on different computers without loosing your files on your ipod. I sometimes want to connect to my friends computer but it keeps telling me I will loose my files. is ther any way around t

  • Multiple audit records per one report refresh

    We use BO XI R3 on Windows with CMS on DB2. I need to create audit reports on BO report usage with following data: username, timestamp, duration, report name for DeskI and WebI reports. I use auditing on DesktopIntelligenceCacheServer and WebIntellig

  • "Invalid key" error --- License Key for system NSP

    Hello SDN Team, I have successfully installed the NW04 ABAP Sneak Preview. Now I'm trying to get a license for it at http://www.sap.com/solutions/netweaver/minisap.epx. I enter all the data, check the License Agreement, hardware key from Transaction