How to use lengthy query in a "SQL Command from Variable"

My oracle SQL Query length is more than 14000 characters, so how can i use this for "SQL command from variable".
Sarvan

Either create a view or a table valued UDF. Using stored procedure in OLEDB source has some gotchas it will not pick up metadata information by default due to late binding.
http://consultingblogs.emc.com/jamiethomson/archive/2006/12/20/SSIS_3A00_-Using-stored-procedures-inside-an-OLE-DB-Source-component.aspx
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Similar Messages

  • How to use Add Query Criteria for the MySQL data Base in Netbeans ?

    How to use Add Query Criteria for the MySQL data Base in Netbeans Visual web pack.
    When the Query Criteria is add like
    SELECT ALL counselors.counselors_id, counselors.first_name, counselors.telephone,counselors.email
    FROM counselors WHERE counselors.counselors_id = ?
    when i run this Query in the Query Window
    i get a error message Box saying
    Query Processing Error Parameter metadata not available for the given statement
    if i run the Query with out Query Criteria its working fine.

    *I am glad I am not the only one who have this problem. Part of issue has been described as above, there are something more in my case.
    Whenever I try to call ****_tabRowSet.setObject(1, userDropList.getSeleted()); I got error message as shown below:*
    The Java codes are:
    public void dropDown1_processValueChange(ValueChangeEvent event) {
    Object s = this.dropDown1.getSelected();
    try {
    this.User_tabDataProvider1.setCursorRow(this.User_tabDataProvider1.findFirst("User_Tab.User_ID", s));
    this.getSessionBean1().getTrip_tabRowSet1().setObject(1, s);
    this.Trip_tabDataProvider1.refresh();
    } catch (Exception e) {
    this.log("Error: ", e);
    this.error("Error: Cannot select user"+e.getMessage());
    SQL statement for Trip_tabRowSet:
    SELECT ALL Trip_Tab.Trip_Date,
    Trip_Tab.User_ID,
    Trip_Tab.Destination
    FROM Trip_Tab
    WHERE Trip_Tab.User_ID = ?
    Error messages are shown below:
    phase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@5abf3f) threw exception: com.sun.rave.web.ui.appbase.ApplicationException: java.sql.SQLException: No value specified for parameter 1 java.sql.SQLException: No value specified for parameter 1
    com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.cleanup(ViewHandlerImpl.java:559)
    com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.afterPhase(ViewHandlerImpl.java:435)
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:274)
    com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
    org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
    com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:240)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
    org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
    com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
    com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
    com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
    com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
    com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
    com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
    com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    tandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
    java.sql.SQLException: No value specified for parameter 1
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)
    at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:1674)
    at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:1622)
    at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1332)
    at com.sun.sql.rowset.internal.CachedRowSetXReader.readData(CachedRowSetXReader.java:193)
    at com.sun.sql.rowset.CachedRowSetXImpl.execute(CachedRowSetXImpl.java:979)
    at com.sun.sql.rowset.CachedRowSetXImpl.execute(CachedRowSetXImpl.java:1439)
    at com.sun.data.provider.impl.CachedRowSetDataProvider.checkExecute(CachedRowSetDataProvider.java:1274)
    at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(CachedRowSetDataProvider.java:335)
    at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorIndex(CachedRowSetDataProvider.java:306)
    at com.sun.data.provider.impl.CachedRowSetDataProvider.getRowCount(CachedRowSetDataProvider.java:639)
    at com.sun.webui.jsf.component.TableRowGroup.getRowKeys(TableRowGroup.java:1236)
    at com.sun.webui.jsf.component.TableRowGroup.getFilteredRowKeys(TableRowGroup.java:820)
    at com.sun.webui.jsf.component.TableRowGroup.getRowCount(TableRowGroup.java:1179)
    at com.sun.webui.jsf.component.Table.getRowCount(Table.java:831)
    at com.sun.webui.jsf.renderkit.html.TableRenderer.renderTitle(TableRenderer.java:420)
    at com.sun.webui.jsf.renderkit.html.TableRenderer.encodeBegin(TableRenderer.java:143)
    at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:810)
    at com.sun.webui.jsf.component.Table.encodeBegin(Table.java:1280)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:881)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
    at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:271)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:182)
    at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:285)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:133)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
    at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
    at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
    at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
    at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    Also when I tried to update my MYSQL connector / J driver to version 5.1.5 from 5.0.5 (NB 5.5.1) and 5.0.7 (NB 6.1), I could not get it work (looooong time to search some JDBC classes and with no response in the end) on both of my Netbean 5.5.1(on PC) and Netbean 6.1(on laptop) IDEs.
    Could anybody look into this issue.
    Many thanks
    Edited by: linqing on Nov 22, 2007 4:48 AM

  • How to use a query in matrix data retrive

    hai  everybody
    how to use a query in matrix data retrive...
    pls ..

    If u have created a UDT to store the data then U can retrive the data through recordset.
    oRecordset.doquery("SQL Statement")
    If u have taken the DB Data source to Manipulate then
    then type
    oMatrix.flushtoDataSource
    then
    U can retrive the data through DB Data source.
    -Manmath

  • How to use power query with sitecatalyst

    Hello,
    I need to use power query to import a table from sitecatalyst. Doing some tests I found that If remove the session from the url that has the report parameters, the app will redirect me to the login page, after entering the company, username and password
    it will load the report page with the data according to my filters.
    When I add the report url on the From Web option, excel does not allow me to add credentials. If I add the login+redirect url it allows me to add user/password but does not load the tables that appear on a regular browser.
    Is it possible to consume sitecatalyst without using Report Builder? If not, how you access the security info after you added the url.
    Thanks.

    To the best of my ability to tell, the right way to use this product from within Power Query would be to use its API. Unfortunately, we don't currently support either of the methods needed to be able to authenticate with the service (OAuth 2.0 and a relatively-custom
    digest-based method). Adding a mechanism to allow use of arbitrary OAuth-protected resources is a fairly high priority for us, and I hope we'll be able to deliver something before mid-2015.
    Scraping the website is very hard to do well -- both from an authentication and from a data discovery perspective.

  • How to use Temporary Table in PL-SQL

    In MySQL there is no Temporary table concept.
    So for intermediate calculation I have created a table as below
    create table SequenceTempTable
    SessionId VARCHAR(50),
    Sequence VARCHAR(500),
    CreatedDate DATE
    ) ENGINE=MEMORY;
    Whenever I invoke a SP, I load the data into SequenceTempTable using Session Id as below
    CREATE PROCEDURE `GetSequence`(
    IN Start_Date VARCHAR(25),
    IN End_Date VARCHAR(25)
    BEGIN
    SELECT UUID() INTO v_SessionId;
    INSERT INTO SequenceTempTable values (v_SessionId,'1,2,5,3',now());
    required code
    DELETE FROM SequenceTempTable WHERE SessionId = v_SessionId;
    COMMIT;
    END;
    i.e. I have created a table as temporary table (created once),
    and load the data using Session Id and once session specific intermediate computation done,
    I deleted the session specific data.
    Could you give me examples of How to use Temporary table in PL-SQL code with respect to my above example.
    Because I have gone through creating Temporary table but I stuck with use in PL-SQL. I mean to say Is there any need of creating table in advance before invoking SP.
    And one more thing as in MySQL temp table I created which is using MEMORY engine i.e. this table will always be in MEMORY so there is no need of writing data on disk.
    Regards
    Sanjeev

    Hi Sanjeev
    Read about GTT here
    http://www.oracle-base.com/articles/8i/TemporaryTables.php
    GTT always contains just session specific data. \
    In case you want to use the GTT in the same session again you can use option
    ON COMMIT PRESERVE ROWS;
    Or if it is used just once in the session use can use
    ON COMMIT DELETE ROWS;
    Do remember that for GTT the data of one session can not be accessed in other session.
    Also you can go away with Delete from GTT if not used again in same session.
    Regards
    Arun

  • How to use this query in R12

    the query below , i am using in valueset :
    select * from AR_LOCATION_VALUES
    Where ar_location_values.location_segment_qualifier =
    'COUNTRY' and ar_location_values.location_structure_id in ( select location_structure_id from ar_system_parameters )
    how to use this query to set in R12?
    Thanks

    hi
    i am using the following query in 11i and i want to use the same in R12 :
    SELECT ar_location_values.location_segment_description,ar_location_values.location_segment_value,location_segment_id
    FROM AR_LOCATION_VALUES
    WHERE ar_location_values.location_segment_qualifier = 'COUNTRY'
    AND ar_location_values.location_structure_id IN
    (SELECT location_structure_id FROM ar_system_parameters)
    note: the table ar_location_values is obsolette in R12 so what is the replacement table in R12 for this?

  • Query help in sql commands

    using apex 4.1 i'm entering the following query in the sql command window and I keep getting a pop-up for Entering Bind Variable. I'm not using bind variables though, anyone else see this issue before?
    SELECT A.FIRST,A.LAST,A.COMPANY AS CNAME,
    J.TOT_MAN_HOURS,
    J.ACREAGE,
    W.NUM_WORKERS,
    W.START_DT
    FROM EW_ACCOUNTS A, EW_WORK_ORDER W, EW_JOBS J
    WHERE A.ID = J.ACCT_ID
    AND J.JOB_ID = W.JOB_ID
    AND W.START_DT >= SYSDATE
    AND W.START_DT < SYSDATE+1
    ORDER BY W.START_DT

    I tried that and it didn't seem to help either.
    Funny though, if I write a new query against just one of the tables and write out each column name. it works. If I use the * instead of writing each column name, I have the same issue.
    This is in apex.appshosting.com free demo environment. I sent them an email asking about it and they told me it was a code issue and they don't support the demo environment.

  • How to use BOTTOM....ENDBOTTOM command in Smatforms?

    Hi,
    The BOTTOM....ENDBOTTOM command can be used in Main Window in SAP Script.
    My query is that how to use BOTTOM....ENDBOTTOM command or something similar in Smartform?
    Regards,
    Nitin

    Hi,
    Footer Window is their in SAP Script also. But BOTTOM....ENDBOTTOM is different in the sense that it can be used within Main Window.
    So using Footer Window does not solve my purpose.
    Regards,
    Nitin

  • Does anyone know how to use pages so you can export pdfs from the internet and automatically drag words from the document into the file name of the pdf (i.e., author, title of a scientific paper)

    Does anyone know how to use pages so you can export pdfs from the internet and automatically drag words from the document into the file name of the pdf (i.e., author, title of a scientific paper). For example, if I am downloading a paper by smith called "Surgery" that was published in 2002, it will automatically set the file name in the download to smith- surgery 2002. I have heard pages is smart enough to do this.
    thank you

    Pages can export only its own documents. They may be exported as PDF, MS Word, RTF or Text files.
    Pages can import (ie. Open a file as, or Insert a file into, a Pages document) documents in several formats, but won't rename the document as you describe. Documents that can be Opened (eg. Text, AppleWorks 6 WP, MS Word files) are converted to Pages documents, and retain their original names, with .pages replacing the original file extension. Files that can be Inserted (generally .jpg, .pdf and other image files) become part of the existing Pages file and lose their names.
    It may be possible, using AppleScript, to extract the text you want and to Save a Pages file using that text as the filename, but that would depend in part on being able to identify which text is wanted and which is not.
    How will the script determine where the author's name begins and where it ends?
    How will the script recognize the beginning and of the title, an decide how much of the title to use in the filename?
    How will the script recognize the year of publication?
    For papers published in a specific journal, with a strict format for placing each of these pieces on information, or containing the needed information as searchable meta data in the file, this might be possible. But it would require knowledge of the structure of these files, and would probably handle only papers published in a specific journal or set of journals.
    Outside my field of knowledge, but there are some talented scripters around here who might want to take a closer look.
    Best of luck.
    Regards,
    Barry

  • How execute pl/sql command from Oracle ADF Business Components

    can't find examples for how execute pl/sql command from Oracle ADF Business Components and how call pl/sql package procedure from ADF Business Components.
    insert,update,delete rows in view object instance cache is good but if i must do some complex operations while insert,update,delete rows..it's more better for me to call
    pl/sql procedure from oracle db.Am i wrong ????

    Roman,
    this should be similar to how it worked in JDeveloper 9.0.3. hava a look at <JDev903 Home>\BC4J\samples\StoredProc for a code example.
    Frank

  • Modify SQL command from code

    Edit SQL command from code for example from delphi.

    Yes and No
    See [Rules of Engagement|Welcome and Rules of Engagement;

  • How to Use the Procedures in a Sql Query

    Hi Friends,
    Can anyone help me out whether can we use the procedure in the sql query..
    if yes help me out with an example
    my requirement is
    i have one sql query .. in which i need to use the procedure which returns multiple values... how can i overcome it,can anyone help me out for this..
    for your reference i am pasting the sql query
    SELECT paf.person_id
    FROM per_all_assignments_f paf START WITH paf.person_id = p_person_id
    AND paf.primary_flag = 'Y'
    AND paf.assignment_type IN('E', 'C')
    AND l_effective_date BETWEEN paf.effective_start_date
    AND paf.effective_end_date
    CONNECT BY PRIOR paf.supervisor_id = paf.person_id
    AND paf.primary_flag = 'Y'
    AND paf.assignment_type IN('E', 'C')
    AND l_effective_date BETWEEN paf.effective_start_date
    AND paf.effective_end_date
    and paf.person_id not in (>>>I HAVE TO USE THE PROCEDURE HERE<<<<);
    Thanks in advance

    We never saw your procedure, but maybe you could wrap it in a function
    SQL> create or replace procedure get_members(in_something IN number, out_members OUT sys_refcursor)
    is
    begin
      open out_members for
        'select level member_id from dual connect by level <= :num' using in_something;
    end get_members;
    Procedure created.
    SQL> create or replace type numbers as table of number;
    Type created.
    SQL> create or replace function members(in_something IN number)
    return numbers
    as
      member_cur sys_refcursor;
      members numbers;
    begin
      get_members(in_something, member_cur);
      fetch member_cur bulk collect into members;
      close member_cur;
      return members;
    end;
    Function created.
    SQL> select * from  table(members(4));
    COLUMN_VALUE
               1
               2
               3
               4
    4 rows selected.Variant on same using piplined function
    SQL> create or replace function members_piped(in_something IN number)
    return numbers pipelined
    as
      member_cur sys_refcursor;
      rec number;
    begin
      get_members(in_something, member_cur);
      loop
         fetch member_cur into rec;
         exit when member_cur%notfound;
         pipe row(rec);
      end loop;
      close member_cur;
      return;
    end;
    Function created.
    SQL> select * from  table(members_piped(4));
    COLUMN_VALUE
               1
               2
               3
               4
    4 rows selected.
    SQL> drop function members_piped;
    Function dropped.
    SQL> drop function members;
    Function dropped.
    SQL> drop type numbers;
    Type dropped.
    SQL> drop procedure get_members;
    Procedure droppedEdit:
    Sorry Blu, had not seen you already posted similar thing
    Edited by: Peter on Jan 27, 2011 5:38 AM

  • How to use an array in a SQL Query

    Hi
    I need to use an array of numbers such as a VARRAY or Associated Index Array so that I can do the following SQL:
    select *
    from *
    where array is null or id is in array
    So that if the array is empty it will return all the records, and if the array is not empty then it will return only the rows associated with the ids in the array.
    Is this possible?
    Regards,
    Néstor Boscán

    Actually, solution I posted returns all rows when VARRAY is empty, not when it is null. To return all rows when VARRAY is null, use:
    SQL> select  ename
      2    from  emp
      3    where deptno in (select * from table(cast(sys.OdciNumberList(10,30) as sys.OdciNumberList)))
      4       or sys.OdciNumberList(10,30) is null
      5  /
    ENAME
    ALLEN
    WARD
    MARTIN
    BLAKE
    CLARK
    KING
    TURNER
    JAMES
    MILLER
    9 rows selected.
    SQL> select  ename
      2    from  emp
      3    where deptno in (select * from table(cast(null as sys.OdciNumberList)))
      4       or null is null
      5  /
    ENAME
    SMITH
    ALLEN
    WARD
    JONES
    MARTIN
    BLAKE
    CLARK
    SCOTT
    KING
    TURNER
    ADAMS
    ENAME
    JAMES
    FORD
    MILLER
    14 rows selected.
    SQL> SY.

  • How to use one query against multiple table and recieve one report?

    I have duplicate tables, (except for their names of course) with commodities prices. They have the same column headings, but the data is different of course. I have a query that gives me a certain piece of information I am looking for but now I need to run this query against every table. I will do this every day as well, to see if the buying criteria is met. There are alot of tables though (256). Is there a way to say run query in all tables and return the results in one place? Thanks for your help.

    hey
    a. the all 256 tables whuld be one big partitoned table
    b. you can use all_tables in order to write a select that will write the report for you:
    SQL> set head off
    SQL> select 'select * from (' from dual
      2  union all
      3  select 'select count(*) from ' || table_name || ' union all ' from a
      4  where table_name like 'DB%' AND ROWNUM <= 3
      5  union all
      6  select ')' from dual;
    select * from (
    select count(*) from DBMS_LOCK_ALLOCATED union all
    select count(*) from DBMS_ALERT_INFO union all
    select count(*) from DBMS_UPG_LOG$ union all
    remove the last 'union all', and tun the generated quary -
    SQL> set head on
    SQL> select * from (
      2  select count(*) from DBMS_LOCK_ALLOCATED union all
      3  select count(*) from DBMS_ALERT_INFO union all
      4  select count(*) from DBMS_UPG_LOG$
      5  );
      COUNT(*)
             0
             0
             0
    Amiel

  • How to use one query results in another query

    hi,
    in help.sap I have founded that using variable type replacement path I can use one query results in another query. It is wrote there that I have to choose query name results I want to get in variable definition but I do not know where.
    How I can do this?
    Result I want to get is:
    In one query I have material prices in another material quantities. I want to calculate inventory value (price * quantity). Moreover prices are on plant level, quantities on storage type level. Plant is atribute of storage type.
    Can I do this?
    Regards,
    Andrzej

    Hi Andrzej,
    please check out this thread: Set parameters values depending on other parameters
    I had a discussion about query results as input for another query in there.
    For creating a workbook, just click on the save button after you ran your query in the bex.
    Siggi
    Message was edited by: Siegfried Szameitat

Maybe you are looking for

  • JSP import statement problem

    Hey, I got confused with all import statement with jsp. Here is my problem. Folder structure: C:\Program Files\netbeans-4.1\enterprise1\jakarta-tomcat-5.5.7\webapps\ROOT\WEB\S\A This folder contains a.jsp. JSP code: <%@ page      language="java"     

  • Couldn´t fill mdsys_sdo_geom_metadata   /  spatial index error

    hi, if i create a spatial index i got the known error: ERROR at line 1: ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine ORA-13203: failed to read USER_SDO_GEOM_METADATA table ORA-13203: failed to read USER_SDO_GEOM_METADATA tabl

  • Term Loan or Working Capital Loans

    Hi How to deal with term loan and working capital loans in financial moduls. Objective is to reduce the no of accounts for loan liability accounts in GL. Regards, Ravi Kumar V

  • HOW TO separate CSS,JS from psp

    HI,everyone I'm reading the <<Learning Oracle PL/SQL>>,hava a question,I want to separate CSS,JS from HTML. like others use 'import' or 'include' or <script src="test.js"/> etc. I don't know where to put external file(css,js),procedure can access,ple

  • Ordering display in a KF

    Hi All, I am writing a query where I have the user selection on Region. The query gives the sale figures as per these regions. Now, the requirement says that these regions need to have an order of their own. Like, N           1 E           2 W