Pass the name of the table to report dynamically?

I'm looking for any method any table name for a sql statement through an independent written report.

a short example:
I'm trying to create a report that lets me select a column in a table - time (column and table) should be provided in time, the report is run.
Of course, something like
select :column
from :table
does not work; the error is ORA-01745.

Is someone know a method to pass a string to the variable in the SQL before the cursor created?

You cannot use LIE in FROM apparently, although I am struggling to find that explicitly in the DOCs, then you need to use & or & in your query of dynamic report OF clauses.

Tags: Database

Similar Questions

  • Complete the table 2D-report dynamically

    Hello

    is there a way to create a Table 2D mode report dynamically with the method "Data.GetChannels"? ".

    I've got this starting position:

    -in the Dataportal are up to 5 groups (maybe less...)

    -in each group is a channel 'speed' and 'time', which has only a single value

    No, I want a 2D in report Table that looks like this

















    Time 100 200 Group 3-time-value
    Speed 25 30 String value in a group 3
    more channels 1 2 String value in a group 3

    I can do this by using textlists for each col, but the handling is very bad if a channelname Exchange.

    An alternative workaround blend groups temporarily to one group, but I hope there is a way to use the Data.GetChannels("Group*/Speed") command.

    Greetings,

    Martin Kozlowski

    Hi Martin,

    In general I would discourage you to use channels with only 1 value.  In almost all cases, it is best to store this information as a property of the channel or group.

    You can still get something like what you ask to leave your 1 value existing channels if you create columns of table which is of type "Expression", set up the table to be in a display of 'Horizontal' alignment, the value of the number of scale of lines the right number of groups and use expressions like these :

    @Data.Root.ChannelGroups (D2TabRow). Channels ("Time"). Values (1) @

    @@str (Data.Root.ChannelGroups (D2TabRow). Channels ("Noise"). ("Values (1), d.dd") @ «»

    Brad Turpin

    Tiara Product Support Engineer

    National Instruments

  • Add the table to report without timestamp

    Hello

    I try to use the Report Generation Toolkit for Office into my excel report.

    I have an excel template which I access via the generation of report vi in order to pass a double 2d array.

    The array is passed in the report, however, the vi seems to add a timestamp column.

    Is there a way to prevent the vi to add the timestamp.

    Thanks for any help you can give me.

    If anyone has the same problem, I just found that if you convert the 2d 2D array of strings table then the vi is more adds a timestamp.

  • not able to pass the table name as parameter in the function

    Hello

    I am not able to move from tablename as parameter. I use the below function.
    -------------------------------------------------------------------------------------------------

    function count_test (tabname varchar2) return number is
    l_count number;
    Start

    Select count (*) IN the tabname FROM l_count;

    RETURN l_count;
    END;

    You can not do with static SQL.

    The only way is to do it with dynamic SQL:

    EXECUTE IMMEDIATE ' select count (*) FROM ' | tabname INTO l_count;

    Kind regards.
    Al

    Published by: Alberto Faenza 10 may 2012 01:44
    Misspelling

  • draw the table using report generation tools


    Hello

    Here's the code...

  • Droping a table from within a procedure by passing the name of the Table as an Argument

    HII All

    I want to remove a table from a procedure dynamically passing the table name as a parameter of a procedure manual

    to do this, I wrote the following procedure

    CREATE OR REPLACE PROCEDURE DEL_TAB (TAB_NAME IN VARCHAR2) AS

    V_TAB_NAME VARCHAR2 (10);

    V_STMT VARCHAR2 (50);

    BEGIN

    V_TAB_NAME: = TABLE_NAME;

    V_STMT: = 'DROP TABLE' | V_TAB_NAME;

    RUN IMMEDIATELY 'V_STMT ';

    DBMS_OUTPUT. PUT_LINE(V_TAB_NAME||) e TABLE DELETED ');

    END DEL_TAB;

    but whenever I'm execute it gives me an error

    ERROR on line 1:

    ORA-06550: line 1, column 15:

    PLS-00357: Table, view or sequence of reference 'A' not allowed in this context

    ORA-06550: line 1, column 7:

    PL/SQL: Statement ignored

    Please tell me the solution...

    Thanks in advance

    Alisson

    Why do you want to implement this procedure? If you want to remove a table just issue the DROP of stand-alone statement. Why write a procedure for this? Also you must understand the difference between REMOVE and DROP in the context of RDBMS. You either use them which is incorrect. DELETION is to remove rows from a table and DROP is to remove the database table.

    And with regard to your problem

    > RUN IMMEDIATELY 'V_STMT ';

    This should be

    immediately run v_stmt;

    You closed the V_STMT variable is in single quotes. You must remove the apostrophes.

  • disorder affecting the values in the table according to cfscript

    I try to pass an array to a function, cfscript and assigning values to it. When I see if the value has been assigned to the right, I get an error saying I'm trying to dereference a scalar.

    function g (q, recsq, arr) / / q is a query name, recsq is the number of lines in q, arr is an array name

    {

    evaluate (arr &'[1] [1] ='& q &'.code [1]');
    WriteOutput(a[1][1]);
    }
    g('qpr','#recsqpr#','apr');

    The allocation already works if I don't mean to call a function, but I would like to know what I'm doing wrong.

    This "disorder" have you passing the table in?

    There is no difference in passing an array as a parameter of function in any other kind of data type:

    myArray = arrayNew();
    myArray [1] = 'something ';
    myArray [2] = "something";

    myArray = myFunction (myArray);

    writeOutput ("here is the new value: #myArray [3] #");

    Function myFunction (someArray) {}
    arrayAppend (someArray, 'new value');
       
    return untableau;
    }

    Do you understand how everything works?

    --

    Adam

  • Hi people. IM new here. Need to accelerate a clarification on the table!

    We have a scheme of production with 200 ~ tables in my body and I feel the performance of important queries in reports can be increased up to with the approach below.

    Current settings - movement of the line is disabled for all tables.

    What I can,

    (1) to activate the movement of the line with "change the movement line of table_name enable;" ~ This allows the rows in the table to move dynamically remove the unused blocks.

    (2) remove the unused blocks with "alter table table_name retractable space;"

    (3) turn off the movement of the line with "modify the movement table table_name disable;"line ~ this will stop allowing the lines in the table move dynamically.

    If I do, I get free unused blocks or removed making the table to perform at least a little more fast?

    Will there be an impact elsewhere?

    PS - It was never tried before by someone else in our scheme of production.

    See you soon,.

    Rachida.

    India.

    Use the Segment space Advisor to see what are the tables could benefit from a SHRINK

    Hemant K Collette

  • Hide a button in the header of the table on the following pages

    I have a button to add a line in the header of the table of a dynamic form of LiveCycle and want to hide this button once someone clicks on a button "Lock".  Individual array elements are fine as the elements in the master page.  But I see not where I hide the table elements that are repeated in subsequent pages (header/footer).

    Can anyone help?

    The button Add code app.alert (this.somExpression) is only a temporary measure to allow you to see the expression that you need to reference in your loop for. Now to make your form and have the table spread over several pages. Click on the button on a cup of different pages. It ill diosplay the somExpression for the button you touched. Note the similarities in name... you will see that the Expressions are the same except for the appearance of the Page Name marked by [n]. This scene reproduced occurance is what you need to know... then you can use the instanceManger, count to see how they are and to build your loop for loop through each instance and change the presence of the button.

    make sense?

    Paul

  • How to pass the name of the Table as an argument in Stored Proc

    Hello
    I have a condition in which the name of the table must be passed as an argument of MS and the output should be the County of this table based on certain conditions to filter.

    Something like this:

    create or replace procedure Testing (p_table varchar2, p_count OUT integer) AS
    Start
    Select count (1) in the p_count of p_table;
    end;
    /

    Get the error on execution of code above:
    PL/SQL: ORA-00942: table or view does not exist

    Please let me how can know we do this?

    Thank you.

    Just add the where clause in the statement...

    What about spending ten minutes of reading literature?

    Max
    [My Italian blog Oracle | http://oracleitalia.wordpress.com/2009/12/31/estrarre-i-dati-in-formato-xml-seconda-parte/]

  • Data Modeler: change the layout of the Table report

    Hello

    I use SQL Data Modeling (DM) EA 4.0.

    I used the file-> reports option to generate reports on the Table and in the report

    (1) I could not see the data of the type column? (See table below), are there options to set the Type of data in the report?

    NO.

    Column name

    PK

    FK

    M

    Data type

    DT

    kind

    Domain name

    Formula

    (Default value)

    Security

    Abbreviation

    1

    ID1

    P

    THERE

    (10)

    LT

    2

    ID2

    F

    THERE

    (10)

    LT

    3

    ID3

    THERE

    (1)

    LT

    4

    ID4

    THERE

    (10)

    LT

    5

    ID5

    F

    (20.4)

    LT

    (2) in the options to manage the Table report (reports-> manage). Currently I can remove a position (like Notes of Descriptions, columns, column comments). Is there any way to customize the report so that I can remove some columns (mostly empty) according to the report and add comments as well as the column table column to a new column comments table.

    Please let me know, is there an option to customize the report.

    Note: I even tried to generate the report using the search then the report, but it does not give a full report (I was only able to generate a report on the column or table name or name constraints, not all together).

    Thank you

    Kheira

    Hi Dimitar,

    There are correct.

    for the report without data type, the data type in my relationship is 'UNKNOWN '.

    I have not changed, but now the type of data in the table are 'unknown '.

    I checked a little more on it and found that in the ADMINISTRATION of my 'TYPES' only unknown is here and the defaulttypes xml file is empty. Then I copied a new one.

    So the new design has the data type, but for that I need to generate sound still 'unknown '. I think I saved the unknown. :-(

    Thank you

    Srinivasan.

  • Title of the report based on the value of the Table column

    Hello

    We use OBIEE 10 g.

    We have a Table and a chart based on the table in a report.

    Assume that the table has two columns, ID and NAME

    can we refer dynamically the value of the column NAME in the title of the report?
    for example
    the table has

    ID | NAME
    -------------
    123 | GS

    now, we would like the title to appear as

    Report for the GS

    where GS is dynamic

    Use the narrative mode and refer to the column that you want to display using @2 and place it instead of view title.

    Thank you
    Isabelle Renon

    Published by: Rajesh Raoul - BI on May 2, 2013 05:59

  • by selecting the name of the table as a variable

    Please correct it.

    declare
    v_ename varchar2 (10): = 'emp ';

    Start
    for j in (select ename from v_ename)
    loop
    dbms_output.put_line (j.ename);
    end loop;
    end;

    get error table v_ename does not exist.
    I have to use v_ename, as I don't know the name of the table.

    You need to use dynamic SQL statements if it is really an obligation. In the majority of cases, when people think that they need to code SQL dynamic, however, they attempt to conceal a more fundamental problem of design (often a data model that needs to be fixed). Since you haven't explained why you think you have need to use dynamic SQL statements, it is difficult to know if it's just adding more complexity to your environment.

    If you know that there is always an ENAME column in which table is passed, you know that the ENAME column is always a VARCHAR2 (10), and the number of rows in the table is reasonably small

    SQL> ed
    Wrote file afiedt.buf
    
      1  declare
      2    type ename_tbl is table of varchar2(10);
      3    l_enames ename_tbl;
      4    l_table_name varchar2(30) := 'EMP';
      5  begin
      6    execute immediate 'select ename from ' || l_table_name
      7       bulk collect into l_enames;
      8    for i in 1..l_enames.count
      9    loop
     10      dbms_output.put_line( l_enames(i) );
     11    end loop;
     12* end;
     13  /
    SMITH
    ALLEN
    WARD
    JONES
    MARTIN
    BLAKE
    CLARK
    SCOTT
    KING
    TURNER
    ADAMS
    JAMES
    FORD
    MILLER
    
    PL/SQL procedure successfully completed.
    

    Justin

  • How to give the table name as input for the insertion procedure parameter

    Hello
    Could a little help in this scenario,
    Here is an example of how to insert,
    where the 'b' table name will change at each
    is there a possible way to keep the name of the table as an input parameter

    SQL > CREATE or REPLACE PROCEDURE PROC_INSERT as
    BEGIN 2
    3 INSERT INTO A
    4 (ID, NAME, LOC)
    5. SELECT ID, NAME, B LOC;
    6 VALIDATION;
    7 END;

    Kind regards
    Vikram

    If you need to pass the object name to a SQL running, you must use dynamic SQL statements.

    A simpler way is the following

    create or replace procedure proc_insert
    (
         pTableName varchar2
    )
    as
    begin
         execute immediate 'insert into a (id, name, loc) select id, name, loc from ' || pTableName;
         commit;
    end;
    
  • Inserting into the table of the apex report log

    Hi all

    I have an interactive report with check boxes for each line, when I select a checkbox one according to the report and click the button submit that the first records of departure in the report are getting inserted into the table
    the lines that I select in the report is not getting inserted into the table.

    For example, if I select all 4 records in the box and click submit button 4 first records will be inserted into the table. Not the selected records.

    I put all the attributes attribute of standard report columns.

    Here is my code I wrote for the process to insert in the journal table.
    declare
    v_index varchar2(2000);
    begin
     
    FOR i in 1..APEX_APPLICATION.G_F21.COUNT LOOP
    --v_index := APEX_APPLICATION.G_F21(i);
    
    insert into eptlog(ptr , cat , pgroup , splptr,gisv ,
              mptr , hip , oml ,wa_type , stl_acc,last_updated_by )
    values(apex_application.g_f22(i), A-Cat,P-Group,
    'N',
    'Y',
    'N',
    'Y',
    'HIP',
    'APC',
    'N',
    apex_application.g_user);
    
    END LOOP;
    end;
    For the report query
    -------------------
    select 
    apex_item.checkbox(21,'#ROWNUM#','UNCHECKED')||APEX_ITEM.HIDDEN(22,p.cc||'-'||p.name) ptr,
    p.row_id,
    p.cc,
    c.ctrdesc,
    p.name,
    p.cat,
    ptr.onumber,
    p.c_id,
    apex_item.select_list_from_query(23,ptr.ecat, 'select catdesc,cat from ptrcatmst') cat1,
    apex_item.select_list_from_query(24,ptr.partner_group, 'select pgroup,gid from APTNRGROUP') pgroup,
    apex_item.select_list(25,p.gisv,'Y;10,N;20') iv,
    apex_item.select_list(26,p.splptr,'Y;10,N;20')  splptr,
    sum(rate)
    from aptr p
    left outer join aptr_a s on p.name = s.pname and p.cc = s.cc
    left outer join lcomp c on s.cc = c.cc
    where rate>0 and p.cat1<>'D' and s.cc ='10'
    group by rownum,p.row_id,
    p.cc,
    c.ctrydesc,
    p.name,
    p.cat,
    p.onumber,
    p.cid,
    p.cat1,
    p.pgroup,
    p.iv,
    splptr,
    order by rate desc
    Please guide me on what I need on urgent basis.

    Thank you

    Hello

    I have fixed the bothe insert and update now procs.

    Here's what I changed.

    Changed the sql report to render the rownum as the value for the column in the box.

    Edited the page processes to use the value of rownum.

    Please check and mark the correct answer

    Thank you

Maybe you are looking for

  • AdblockerPlus to update, but I still get ads

    I get a lot of ads recently, even though AdblockerPlus is up-to-date on my browser. When I click on certain links, a second, more small window containing ads opens behind the one I use. There is no model I see as to what sites trigger the popup - it

  • How to stop this script goes all the time at startup

    I've installed shockwave and others, and I always have problems with scripting. Start up as I continue to keep the message script takes to long. Starting with this problem takes 10-15 minutes to reslove.

  • Drive system need, but I can't find it

    Hello I have a Toshiba and when I turn it on it says that I have a system disk, but I can't find anywhere on your website. So can you find and give it to me please coz I need.I beg you!

  • To use or not to use: while loop?

    Being relatively new to LabVIEW and excited by the event programming Structure makes me think that a While loop should almost never be used. A While loop uses "polling" to see if a condition is fulfilled or not before you stop the execution, which ea

  • Photosmart HP 7510: Single color does not print

    Hello Does not print the magenta color. I put a new cartridge in (both are new and not expired). As requested by another post on this page, I have cleaned the contacts on the cartridge and printer with clear water. Did not help. I ran a printed repor