SQL Query Report Not working

Hi,
I have a region as the type
"SQL Query (PL/SQL function body returning SQL query)".
The query works fine for reports if I query two columns. Select 1, 2 from table.
For some reason if the returning query has more than three columns (select 1, 2, 3 from table), I get an error:
"report error:
ORA-01403: no data found"
Any help would be great. Thanks.

Hi,
I've been trying all sorts of things on a test report and the only way that I get extra columns is by including derived columns in the report. Otherwise, even with custom headings, adding or removing columns in the report's PL/SQL adjusts the columns as I would expect.
Are your extra columns derived or can your report return a varying number of columns?
Andy

Similar Messages

  • Adhoc Query report not working fine

    Hi,
    We have a customized infotype  9222 which stores the previous experience of the employees.
    Now I have created a adhoc query in which I have added this infotype.The problem which I am facing is when I put the Indian company codes and run the report, the report is working fine . But when I put a Ukraine Company Code and then run the report ; the report does not picks the experience details of the employees and it shows Zero Yrs and Zero months.
    I have checked in PA30 the experience details are maintained  for the Ukraine employees.
    Is their any setting in the system which allows the infotype for a particular company? or what may be the reason for the strange behaviour of the report towards a specific compant code. Please reply asap

    Hi ,
    Pls check do you have authorization or not for to create Object Directory entry.
    Thanks and Regards,
    Revathi.

  • Where rownum=2 in my sql query is not working . Why ??

    Hello,
    i am using Oracle 11g .Referring scott schema's emp table.
    I just issued this sql query with the intention to get second highest salary of a employee. But i am unable to understand why my query fails ?
    select rownum,empno,ename,sal from (select empno,ename,sal from emp order by sal desc) where rownum=2;This query is returning no rows . Can you tell why this query is returning no rows ?

    888953 wrote:
    Because you can use ROWNUM only to limit the number of returned records, not to return a specific record.
    So only this has sense (n any number):
    ROWNUM <= n
    or
    ROWNUM = 1 (which is equal to ROWNUM <= 1)
    Anything else will not return a row.As i said ,
    select * from (select rownum rn,empno,ename,sal from (select empno,ename,sal from emp order by sal desc)) where rn=2;this query is working fine.So rownm can be used to return a specific record . Please rectify me if i am wrong .

  • An sql query is not working

    Hello everybody,
    I want to enter a word in a table if that word does not already exist in the table.
    I wrote a query like this.
    String word="Football";
    sql="INSERT INTO m_word_list (word_text , category_id , used_counter, date_of_addition, added_by, is_status ) VALUES ('"+word+"', 2, 0, '"+todaysDate+"', '1', '1')WHERE '"+word+"' NOT IN
    (SELECT * FROM `m_word_list` WHERE word_text = '"+word+"');
    Where am I wrong in the query?
    Please help.

    1.) Always post the exception, error message and whatever detail you've got when something "doesn't" work.
    2.) Always use PreparedStatements to execute parameterized queries/updates instead of dynamically building the String
    3.) INSERT INTO doesn't have a where clause.
    Why don't you simply make the wort_text column unique and simply try to insert. If there's already such a word then you'll get a message which tells you.

  • SQL Query will not work in CRXI

    I am using CRXI Developer R2 against an Oracle 9i DB. The following query works in Oracle SQL Developer, but returns no results in Crystal (no errors in Crystal either). Anyone know what is wrong?
    SELECT b1.b1_alt_id,
           b1.b1_per_type,
           issued.status_date IssueDate,
           closed.status_date CloseDate,
           case
           when bc.b1_checklist_comment is null
           then 'No Patch List'
           else bc.b1_checklist_comment
           end PatchList
    FROM   b1permit b1
           INNER JOIN (SELECT b1_per_id1,
                              b1_per_id2,
                              b1_per_id3,
                              status_date
                       FROM   status_history
                       WHERE  status = 'Issued'
                              AND rec_status = 'A'
                              AND status_date BETWEEN '01-JUL-08' AND '31-DEC-08') issued
             ON b1.b1_per_id1 = issued.b1_per_id1
                AND b1.b1_per_id2 = issued.b1_per_id2
                AND b1.b1_per_id3 = issued.b1_per_id3
                AND b1.rec_status = 'A'
                AND b1.b1_per_type = 'Utility'
           LEFT OUTER JOIN (SELECT b1_per_id1,
                                   b1_per_id2,
                                   b1_per_id3,
                                   status_date
                            FROM   status_history
                            WHERE  status = 'Closed'
                                   AND rec_status = 'A') closed
             ON b1.b1_per_id1 = closed.b1_per_id1
                AND b1.b1_per_id2 = closed.b1_per_id2
                AND b1.b1_per_id3 = closed.b1_per_id3
           LEFT OUTER JOIN bchckbox bc
             ON b1.b1_per_id1 = bc.b1_per_id1
                AND b1.b1_per_id2 = bc.b1_per_id2
                AND b1.b1_per_id3 = bc.b1_per_id3
                AND b1.rec_status = bc.rec_status
                AND bc.b1_checkbox_desc LIKE 'Patch List%'

    Hi
    Instead of using this query direct;y, create a view
    as
    CREATE OR REPLACE VIEW V1
    AS
    SELECT <Your query>
    From Oracle client check if view returns desired result by
    select * from <viewName>
    and use that view as a datasource in your report.
    --Kuldeep

  • Discoverer report not working on R12 !

    We have just migrated to R12 from 11i and some of the discoverer query is not working, but the same is working fine when we ran thru SQL Developer or TOAD.
    Is there any context (mo_global.set_policy_context) needs to be set in Discoverer report to get the data?
    Thanks

    Thanks Srini,
    There is no any specific error message, the strange thing is if I run the Discoverer report is not returning any data, but if I set the mo_global.set_policy_context ('S',111) in SQL Developer or TOAD and then run the discoverer report it return data...
    Any pointers?

  • SQL Query report region that only queries on first load

    Hello all,
    Is there any way in which you can prevent a SQL Query report region from quering data after every refresh?
    I would like to make a report that queries on the first load, but then I would like to change the individual values, and reload to show the change, but every time I reload the page the columns are queried and the original values are displayed once again...
    any ideas?
    -Mux

    Chet,
    I created a header process to create the HTMLDB_COLLECTION. It is something like:
    HTMLDB_COLLECTION.CREATE_COLLECTION_FROM_QUERY(
    p_collection_name => 'Course_Data',
    p_query => 'SELECT DISTINCT COURSE_ID, HTMLDB_ITEM.CHECKBOX(14,COURSE_ID) as "checker", TITLE, SUBJECT, COURSE_NUMB, SECTION, ENROLLED, null as "temp_term", null as "temp_title", null as "temp_crse_id", null as "temp_subj", null as "temp_crse_numb", null as "temp_sect", FROM DB_TBL_A, DB_TBL_B, DB_TBL_C, DB_TBL_D, DB_TBL_E, DB_TBL_F WHERE ...');
    The names were changed, for obvious reasons.
    I then created an SQL Report Region to see if it would work. The SQL is:
    SELECT c001, c002, c003
    FROM htmldb_collections
    WHERE collection_name = 'COURSE_DATA'
    When I run the page it says:
    ORA-20104: create_collection_from_query Error:ORA-20104: create_collection_from_query ExecErr:ORA-01008: not all variables bound
    Any idea why this is happening?
    I'm new to HTMLDB_COLLECTIONS, so I may be doing something wrong
    -Mux

  • Setting a Default Value in SQL Query Report

    Hello:
    We are using a SQL Query Report to provide a mass update to a table. We are using the apex.collection and having it display a number of records in a SQL Query Report for mass update. We have 14 columns in the report, for which the first 11 are populated via the collection. The remaining 3 are open for input but the individual making the updates. We've were able to provide a default value for 2 of the remaining 3 columns using a named LOV's - however the fourth column we would like to default a sysdate - but we are not successful.
    We've attempted many things but none seem to work, including adding that column to the collection and assigning it a default sysdate value. We've also tried changing the settings in the report attributes --> Tabular Form Elements by setting the Display as to: Datepicker, Default type to PL/SQL Expression and setting the default to sysdate. We've also tried caputuring a date on the previous page and loading it onto the report page and trying to default the date column to a page item default.
    I'd appreciate any help.
    Thanks
    FYI - we are using version 3.2

    use as default
    to_char(sysdate, 'dd/mm/yyy') where the format is your application or item date format

  • CDR report not working

    Hi,
    We have LYNC 2013 and Monitoring is enabled. the CDR report is not working. even User Activity summary for telconferencing and for audio, reports not working.
    Kindly suggest troubleshooting steps.
    Can we have any SQL query to fetch the report from database?
    Thanks
    jitender

    Hi Raju,
    From Monitoring server , CDR report is not working. Even "User Activity Report" not working and giving below error for "Telephony Conference" and as well for "A/V Conference"
    " No results match the report filters. Change the filter values and submit the query again."
    Thanks
    jitender

  • Temporary Table In SAP Query - Does not Work?

    DECLARE @date DATE
    DECLARE @delrows INT
    DECLARE @delquan INT
    DECLARE @a INT
    DECLARE @recrows INT
    DECLARE @recquan INT
    SET @a=0
    IF OBJECT_ID('tempdb..##tab) IS NOT NULL DROP TABLE ##tab
    CREATE TABLE ##tab
    [Date] date,
    [Delivery Rows] varchar(40),
    [Delivery Total Units] varchar(40),
    [Receipts Rows] varchar(40),
    [Receipts Total Units] varchar(40),
    WHILE @a!=7
         BEGIN
         SET @date=DATEADD(day,-@a, getdate())
         SELECT @delrows=ISNULL(COUNT(DLN1.[LineNum]),0), @delquan=ISNULL(SUM(DLN1.[Quantity]),0)
         FROM ODLN
         INNER JOIN DLN1 ON ODLN.[DocEntry]=DLN1.[DocEntry]
         WHERE ODLN.[CreateDate] = @date
         SELECT @recrows=ISNULL(COUNT(PCH1.[LineNum]),0) , @recquan=ISNULL(SUM(PCH1.[Quantity]),0)
         FROM OPCH
         INNER JOIN PCH1 ON OPCH.[DocEntry]=PCH1.[DocEntry]
         WHERE OPCH.[DocDate]=@date
         SET @a=@a+1
              INSERT INTO ##tab VALUES(@date,@delrows,@delquan,@recrows,@recquan)
    END
    SELECT * FROM ##tab
    {/code}
    Can anyone explain why this query does not work in SAP? It works fine on SQL but gives me this message in SAP:
    1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near ')'.
    2). [Microsoft][SQL Server Native Client 10.0][SQL Server]Statement 'Service Contracts' (OCTR) (s) could not be prepared.
    Edited by: Chris Candido on Feb 2, 2011 8:38 PM

    Chris,
    There are several areas in your code which needed changes. 
    1. On the field name for your temp table you had spaces.
    2. The SAP table name ODLN, OPCH, PCH1 had to be fully referenced like
    [dbo].[ODLN]
    3. You really need not have ## in front of your temp table, it could just be #
    The select at the end is actually what causes the most problem as for some reason from within SAP it does not produce the result.  I would suggest you put the whole code into a Stored Procedure and call the SP from SAP.  Corrected SQL below.  If you remove the Select line at the end the query would work with in SAP, but keep it give give you an error. SP is the best option for this.
    DECLARE @date DATE
    DECLARE @delrows INT
    DECLARE @delquan INT
    DECLARE @a INT
    DECLARE @recrows INT
    DECLARE @recquan INT
    SET @a=0
    IF object_id('tempdb..#tab') IS NOT NULL
    BEGIN
       DROP TABLE #tab
    END
    CREATE TABLE #tab
    [Date] date,
    DeliveryRows varchar(40),
    DeliveryTotalUnits varchar(40),
    ReceiptsRows varchar(40),
    ReceiptsTotalUnits varchar(40),
    WHILE @a!=7
    BEGIN
    SET @date=DATEADD(day,-@a, getdate())
    SELECT @delrows=ISNULL(COUNT(DLN1.LineNum),0), @delquan=ISNULL(SUM(DLN1.Quantity),0)
    FROM [dbo].[ODLN]
    INNER JOIN DLN1 ON [dbo].[ODLN].DocEntry=DLN1.DocEntry
    WHERE [dbo].[ODLN].CreateDate = @date
    SELECT @recrows=ISNULL(COUNT([dbo].[PCH1].LineNum),0) , @recquan=ISNULL(SUM([dbo].[PCH1].Quantity),0)
    FROM [dbo].[OPCH]
    INNER JOIN [dbo].[PCH1] ON [dbo].[OPCH].DocEntry=[dbo].[PCH1].DocEntry
    WHERE [dbo].[OPCH].DocDate=@date
    SET @a=@a+1
    INSERT INTO #tab VALUES(@date,@delrows,@delquan,@recrows,@recquan)
    END
    SELECT * FROM #tab
    Suda Sampath

  • How do you select a clob column in an SQL query report?

    I must be missing something fundamental as there is practically no help on this on the forum.
    All I want to do is ...
    select numcol,aclob_col from table
    in an SQL Query report.
    Sounds easy??? I get no data appearing in the clob column. Doesn't work in SQL Workshop either. What's the catch??
    regards
    Paul P

    Paul,
    It works when I try it. What version of Application Express, what is the table DDL, the exact query, and how much data is in the clob columns?
    Scott

  • Why select query is not working?

    CREATE OR REPLACE TYPE prod_type AS OBJECT (
    pid INT,
    pprice NUMBER,
    MEMBER PROCEDURE display(pid IN NUMBER));
    create table prod of prod_type (pid primary key);
    CREATE OR REPLACE TYPE deal_type UNDER prod_type (
    ctr NUMBER,
    OVERRIDING MEMBER PROCEDURE display (pid IN NUMBER),
    insert into prod values(deal_type(101, 4, 1));
    insert into prod values(deal_type(102, 5, 0));
    ------below given select query is NOT WORKING ---------
    select ctr from prod p where p.pid=101;
    Thanks,
    -Nid

    ------below given select query is NOT WORKINGWondering how you inserted data ...
    SQL> CREATE OR REPLACE TYPE prod_type AS OBJECT (
      2  pid INT,
      3  pprice NUMBER,
      4  MEMBER PROCEDURE display(pid IN NUMBER));
      5  /
    Type created.
    SQL>
    SQL> create table prod of prod_type (pid primary key);
    Table created.
    SQL>
    SQL> CREATE OR REPLACE TYPE deal_type UNDER prod_type (
      2  ctr NUMBER,
      3  OVERRIDING MEMBER PROCEDURE display (pid IN NUMBER),
      4  );
      5  /
    Warning: Type created with compilation errors.
    SQL> sho err
    Errors for TYPE DEAL_TYPE:
    LINE/COL ERROR
    4/1      PLS-00103: Encountered the symbol ")" when expecting one of the
             following:
             , not pragma <an identifier>
             <a double-quoted delimited-identifier> final instantiable
             current order overriding static member constructor map
    SQL> CREATE OR REPLACE TYPE deal_type UNDER prod_type (
      2  ctr NUMBER,
      3  OVERRIDING MEMBER PROCEDURE display (pid IN NUMBER));
      4  /
    Warning: Type created with compilation errors.
    SQL> sho err
    Errors for TYPE DEAL_TYPE:
    LINE/COL ERROR
    1/1      PLS-00590: attempting to create a subtype UNDER a FINAL type
    SQL>You made an attempt to create a subtype UNDER a FINAL type - that the reason why can not work ...
    Avoid deriving a subtype from this FINAL type.
    HTH

  • Excel 2010 MS Query is not working

    Hi, I am in the process of upgrading all my Excel 2003 spreadsheets to Excel 2010.  I am running into problem with the MS Query.  Spreadsheets have MS Query linking to MS database.  However, when I open some of the spreadsheets, the MS Query
    is not working ie. the blue circle keeps turning and then not responding.  It is very weird that this MS Query is working fine with some spreadsheets but not couple and they are all linking to the same database except a small different in criteria.  I
    tried to re-create the Query in the spreadsheet in Excel 2010 by going to Data>From Other Sources>From Microsoft Query and select the database.  Once I set up the criteria and click Return data, the Query gets stuck.
    Please help! Any comments/suggestions will be appreciated.
    Thanks

    Hi,
    There are many possible causes that can crash MSQuery in Excel 2010.
    First, please make sure we have installed the latest Office 2010 and Windows patches.
    Second, Please read the Blog, it explains one typical crash scenario.
    =====
    AppName: msqry32.exe AppVer: 14.0.4750.1000 ModName: msvcr90.dll
    There are several possible resolution you can try to resolve the above crash:
    1. When you launch MS Query, just disable the option "Validate queries before saving or returning data", this is the fifth box in the options menu.
    The only problem is that if you have made any mistake in your query, you'll only be noticed when receiving the data in excel.
    2. Repair all the keys into registry at the following place:
    [HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\ODBC]
    For example:
    Windows Registry Editor Version 5.00
    [HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\ODBC]
    "TraceFile"="C:\\DOCUME~1\\...USERNAME...\\IMPOST~1\\Temp\\SQL.LOG"
    "TraceDll"="C:\\WINDOWS\\system32\\odbctrac.dll"
    http://blogs.technet.com/b/asiasupp/archive/2011/11/07/msquery-randomly-crashed.aspx
    =====
    Third, start the Excel 2010 with
    safe mode, it helps us confirm if some add-ins cause this issue.
    Hope it's helpful.
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in
    Office programs.

  • Sql Monitor is not working for forms10g

    Hi All,
    Sql Monitor is not working for forms10g.How can i solve this problems.
    Regards
    Gopinath M

    using sqlmonitor i have traced the forms 6i (.fmx),in this case toad additional
    software sql monitor is automatically added the frmbld.exe in application.
    whatever i am doing in forms runtime the sqlmonitor provide the sql query.
    for examble i am opening the lov with the help of F9.Now the sqlmonitor trace
    the sql query for that lov item.so its very helpful to see the query without
    the source(.fmb).
    Now the problem is the sqlmonitor is not added the iexplore.exe in application.
    because it added frmbld.exe only not for iexplore.exe.but the 10g forms are
    running from the explorer.is there any other forms trace method is available
    pls kindly guide to me.

  • SQL Query Report (Customize link)

    I have an SQL query report with bind variables so that users can choose conditions for the query. If I don't have any conditions, the report is empty. How do I get it to display all the records. I tried typing * but it didn't work.
    Basically I want it to act like the Query Wizard's Customize feature. The report give me all the records. I can query one field or all the fields.
    In the SQL report's Customize feature, I have to enter a value for all the bind variables I have. What if I just want to query one field. What do I put in the others to indicate that I want all. I hope this makes some sort of sense and that someone out there knows what I'm blabbing about.

    Hi,
    I h've same type of requirement in most of my reports in the application and I h've solved this in the sql of the report itself. Let's see a example report from the table scott.emp with a sql like
    Select EMPNO,
    ENAME,
    JOB,
    MGR,
    HIREDATE,
    SAL,
    DEPTNO
    From scott.emp
    Where EMPNO = nvl(:v_empno,EMPNO)
    and DEPTNO = nvl(:v_deptno,DEPTNO)
    where :v_empno and :v_deptno are bind variables to this report and if there is no arguements passed to these arguements all the records will be retrieved from the table ..likeley if value for any one of these arguements is passed then this sql will return only those records which meet that condition.
    Hope this helps
    -Krishnamurthy

Maybe you are looking for

  • Photo text/email problem

    i know the iphone cant send normal photo text messages so I tried the [email protected] way. I also tried sending it to a tmobile user. both times they would get the text message but no photo. and if they reply to it and send me a photo i get there's

  • TS4291 Apple Support article TS4291 "Error messages appear when you access MobileMe"

    I occationally, seemingly randomly, get the error message, "There was a problem connecting to the server "idisk.mac.com". Contact your system administrator for more information."  Plus it allways takes somewhere in the neighborhood of 20 clicks to cl

  • How to dynamically call a Taskflow

    Hi All, We have a task flow say "CreateA". When the parameters are passed to this task flow, it will create some document. Now, this taskflow can be consumed by many teams i.e., when user clicks on "Add" button in the consumer page, this taskflow sho

  • Stalled installation on OSX Mountain Lion.

    While upgrading to Mountain Lion, I get as far as "Preparing to install. Your computer will restart automatically" and that's all. Even left overnight, I found it still there in the morning. Everything else seems to work fine. I would like to complet

  • Is Quicktime 7.6.6 compatible with FCE 3.5.1?

    Hi, Is Quicktime 7.6.6 compatible with FCE 3.5.1? I currently have Quicktime 7.6.4 and FCE 3.5.1 and everything works well. I see that there is an update for Quicktime 7.6.6. I think the update has been around for awhile. I've been burned in the past