SQL query generating data in SQL management studio but not in CUIC interface

Hello,
I'm working on a UCCE 9.0 system
I created SQL query for a  report.
Whenever I run the query inside the SQL management studio, it works and generates data, but when I run it in the CUIC interface it works but generates nothing. As you can see in the below snapshot, it contains 209 records that are not being displayed.
Any help would be greatly apprciated

Is it a custom report ? Can you right click on your Custom Report and click on Edit Views. You need to check whether you have Grid Headers Listed.
Regards,
Senthil

Similar Messages

  • Query runs in management studio but not in SQLAgent job

    I have the following query which runs fine in Management Studio but when I put it in a SQLAgent job it fails saying
    Error formatting query, probably invalid parameters (SQLState 42000 Error 22050)I have tried changing Quote characters but to no avail.
    Does anybody have any idea why this would be happening?
    Regards
    Ron
    declare @servername nvarchar(150)
     set @servername = @@servername
     declare @mysubject nvarchar(200)
     set @mysubject = 'Toners adjusted out '+@servername+'.'
     EXEC msdb.dbo.sp_send_dbmail @recipients='[email protected]',
     @subject = @mysubject,
     @body = 'Toners were adjusted out. View attachment to see the details',
     @query = 'use livedatabase;select trc_part, trc_job, trc_qty, trc_inits from livedatabase.dbo.Traces
    where trc_part like "TONER%"
    and CAST(trc_date as date) = CAST(getdate() as date)
    and trc_typ = "O"',
     @query_result_width = 600,
     @attach_query_result_as_file = 1

    I have another SQLAgent job that is almost identical in what it does, ie sending an email with a query result and it works fine. See below.
    Therefore it can't be permissions or dbmail setup but I cannot see what it is.
    --== This is for SQL 2005 and higher. ==--
    --== We will create a temporary table to hold the error log detail. ==--
    --== Before we create the temporary table, we make sure it does not already exist. ==--
     IF OBJECT_ID('tempdb.dbo.ErrorLog') IS Not Null
     BEGIN
     DROP TABLE tempdb.dbo.ErrorLog
     END
     --== We have checked for the existence of the temporary table and dropped it if it was there. ==--
     --== Now, we can create the table called tempdb.dbo.ErrorLog ==--
    CREATE TABLE tempdb.dbo.ErrorLog (Id int IDENTITY (1, 1) NOT NULL,
    logdate DATETIME, procInfo VARCHAR(10), ERRORLOG VARCHAR(MAX))
    --== We create a 3 column table to hold the contents of the SQL Server Error log. ==--
    --== Then we insert the actual data from the Error log into our newly created table. ==--
     INSERT INTO tempdb.dbo.ErrorLog
     EXEC master.dbo.sp_readerrorlog
    --== With our table created and populated, we can now use the info inside of it. ==--
     BEGIN
    --== Set a variable to get our instance name. ==--
    --== We do this so the email we receive makes more sense. ==--
     declare @servername nvarchar(150)
     set @servername = @@servername
    --== We set another variable to create a subject line for the email. ==--
     declare @mysubject nvarchar(200)
     set @mysubject = 'Deadlock event notification on server
    '+@servername+'.'
     --== Now we will prepare and send the email. Change the email address to suite your environment. ==--
     EXEC msdb.dbo.sp_send_dbmail @recipients='[email protected]',
     @subject = @mysubject,
     @body = 'Deadlock has occurred. View attachment to see the deadlock info',
     @query = 'select logdate, procInfo, ERRORLOG from tempdb.dbo.ErrorLog where Id >= (select TOP 1 Id from tempdb.dbo.ErrorLog WHERE ERRORLOG Like ''%Deadlock encountered%'' order by Id DESC)',
     @query_result_width = 600,
     @attach_query_result_as_file = 1
     END
     --== Clean up our process by dropping our temporary table. ==--
     DROP TABLE tempdb.dbo.ErrorLog

  • How to compare result from sql query with data writen in html input tag?

    how to compare result
    from sql query with data
    writen in html input tag?
    I need to compare
    user and password in html form
    with all user and password in database
    how to do this?
    or put the resulr from sql query
    in array
    please help me?

    Hi dejani
    first get the user name and password enter by the user
    using
    String sUsername=request.getParameter("name of the textfield");
    String sPassword=request.getParameter("name of the textfield");
    after executeQuery() statement
    int exist=0;
    while(rs.next())
    String sUserId= rs.getString("username");
    String sPass_wd= rs.getString("password");
    if(sUserId.equals(sUsername) && sPass_wd.equals(sPassword))
    exist=1;
    if(exist==1)
    out.println("user exist");
    else
    out.println("not exist");

  • SQL Query using DATS data type

    Hello people,
    I have a table 'TableA' with a column 'xpto' that has DATS data type.
    A lot of lines in this table has this field empty.
    I have to create a SQL query to select those lines with this field not empty.
    Select * from TableA
    where xpto is not null
    It does not work.... The result is all the lines in the table.
    What is wrong?
    Thanks!

    Easiest way to do this is :
    constants l_xpto   type tableA-xpto  value is initial
    Select * from TableA
    where xpto ne l_xpto.
    You can see the NULL/NOT NULL settings for the column through SE11
    Utilities -> Database Object -> Display.
    I tend to set the "Initial Value" flag when adding columns to tables, which creates the database column as NOT NULL with a default value (whatever SAP considers the initial value for that datatype). I think SAP does this by default, but I've had issues where it hasn't so I do this to ensure consistency
    Chris Bain

  • Multiple SQL Query as Data Source

    I have an SQL Query as Data Source of my Crystal Report. It combine the contents of two tables.
    I want to do another SQL query based on the previuos SQL Query.
    Can I do this in CR ? How I can reference the new SQL query to the main SQL query ?
    Thanks,
    Gabriel

    This is my main Query
    SELECT
    SBO_001.dbo.JDT1.Account,
    sum(SBO_001.dbo.JDT1.SYSDeb - SBO_001.dbo.JDT1.SYSCred) AS Balance_001,
    0 as Balance_004
    FROM SBO_001.dbo.JDT1
    GROUP BY SBO_001.dbo.JDT1.Account
    UNION
    SELECT
    SBO_004.dbo.JDT1.Account,
    0 as Balance_001,
    sum(SBO_004.dbo.JDT1.SYSDeb - SBO_004.dbo.JDT1.SYSCred) AS Balance_004
    FROM SBO_004.dbo.JDT1
    GROUP BY SBO_004.dbo.JDT1.Account
    This is a result
    Account     Balance_001     Balance_004
    80800005     0     -431.67
    80800005     590121.07           0
    80800006     -3621028.250            0     
    88780056     5000.00                    0
    90731001     0                          174780.11     
    I want to obtain this result
    Account     Balance_001            Balance_004
    80800005     590121.07             -431.67
    80800006     -3621028.250            0     
    88780056     5000.00                    0
    90731001     0                          174780.11     
    How I Can modify this Query?
    Thanks,
    Edited by: gablus on Aug 7, 2009 1:43 AM

  • How to view the sql query generated in query designer..?

    Hi experts,
       Can i view the sql query generated by the query designer for a query in sap bw?
    regards,
    ksvsivam

    Hi Sivam,
    You can definitely view the sql query.
    Go to RSRT and give the report name. Then goto Execute+Debug and click on it.
    A new window will open, there tick the box  Display SQL/BIA Query and the press on the ok button.
    Finally click on execute. The Sql query will be displayed.
    Hope this helps.
    Thanks,
    Rahul

  • PL/SQL function body returning SQL query - ORA-06502: PL/SQL: numeric or value error

    I'm attempting to dynamically generate a rather large SQL query via the "PL/SQL function body returning SQL query" report region option.  The SQL query generated will possibly be over 32K.  When I execute my page, I sometimes receive the "ORA-06502: PL/SQL: numeric or value error" which points to a larger than 32K query that was generated.  I've seen other posts in the forum related to this dynamic SQL size limitation issue, but they are older (pre-2010) and point to the 32K limit of the DNS (EXECUTE IMMEDIATE) and DBMS_SQL.  I found this post (dynamic sql enhancements in 11g) which discusses 11g no longer having the 32K size limitation for generating dynamic SQL.  Our environment is on 11gR2 and using ApEx 4.2.1.  I do not know which dynamic SQL method -- DNS or DBMS_SQL -- ApEx 4.2.1 is using.  Can someone clarify for me which dynamic SQL method ApEx uses to implement the "PL/SQL function body returning SQL query" option?
    As a test, I created a page on apex.oracle.com with a report region with the following source:
    declare
      l_stub varchar2(25) := 'select * from sys.dual ';
      l_sql  clob := l_stub || 'union all ';
      br     number(3) := 33;
    begin
      while length ( l_sql ) < 34000 loop
        l_sql := l_sql || l_stub || 'union all ';
      end loop;
      l_sql := l_sql || l_stub;
      for i in 1 .. ceil ( length ( l_sql ) / br ) loop
        dbms_output.put_line ( dbms_lob.substr ( l_sql, br, ( ( i - 1 ) * br ) + 1 ) );
      end loop;
      return l_sql;
    end;
    The dbms_output section is there to be able to run this code in SQL*Plus and confirm the size of the SQL is indeed larger than 32K.  When running this in SQL*Plus, the procedure is successful and produces a proper SQL statement which can be executed.  When I put this into the report region on apex.oracle.com, I get the ORA-06502 error.
    I can certainly implement a work-around for my issue by creating a 'Before Header' process on the page which populates an ApEx collection with the data I am returning and then the report can simply select from the collection, but according to documentation, the above 32K limitation should be resolved in 11g.  Thoughts?
    Shane.

    What setting do you use in your report properties - especially in Type and in Region Source?
    If you have Type="SQL Query", then you should have a SELECT statement in the Region Source. Something like: SELECT .... FROM ... WHERE
    According to the ERR-1101 error message, you have probably set Type to "SQL Query (PL/SQL function body returning SQL query)". In this situation APEX expects you to write a body of a PL/SQL function, that will generate the text of a SQL query that APEX should run. So it can be something like:
    declare
    mycond varchar2(4000);
    begin
    if :P1_REPORT_SEARCH is not null THEN
    mycond:='WHERE LAST_NAME like :P1_REPORT_SEARCH ||''%''';
    end if;
    return 'select EMPLOYEE_ID, FIRST_NAME, LAST_NAME from EMPLOYEES ' ||mycond;
    end;
    And for escaping - are you interested in escaping the LIKE wildcards, or the quotes?
    For escaping the wildcards in LIKE function so that when the user enters % you will find a record with % and not all functions, look into the SQL Reference:
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/conditions007.htm
    (You would than need to change the code of your function accordingly).
    If you are interested in escaping the quotes, try to avoid concatenating the values entered by the user into the SQL. If you can, use bind variables instead - as I have in my example above. If you start concatenating the values into the text of SQL, you are open to SQLInjection - user can enter anything, even things that will break your SQL. If you really need to allow users to choose the operator, I would probably give them a separate combo for operators and a textfield for values, than you could check if the operator is one of the allowed ones and create the condition accordingly - and than still use bind variable for inserting the filtering value into the query.

  • Hi in my sql query i applied like condition (like '%TEST') but it is taking long time

    Hi in my sql query i applied like condition (like '%TEST') but it is taking long time. I applied indexes also,but still i'm facing the same problem. In my databse nearly 2,00,000 records their.

    Hi Manikandan
    Is there a difference in performance between running the query in BEx and WebI?
    have you aggregates in place on the BEx side of things?
    When you say its taking too long to open the report, have you a variable screen coming up for the report and is that what is taking the time or is it the report execution.
    With regards
    Gill

  • Management Studio Login not possible

    Hello,
    I use BB 10.2.1 and after the latest Update the Management Studio is not accessable. I cannot give in Login Name and Password because thies fields are missing. I only the the drop down menu "Log in using" an this is empty.
    Do you have any ideas?
    Thanks and regards.
    Doreen

    are we talking about BES server?
    how are you accessing BMS and what browser version?
    Click here to Backup the data on your BlackBerry Device! It's important, and FREE!
    Click "Accept as Solution" if your problem is solved. To give thanks, click thumbs up
    Click to search the Knowledge Base at BTSC and click to Read The Fabulous Manuals
    BESAdmin's, please make a signature with your BES environment info.
    SIM Free BlackBerry Unlocking FAQ
    Follow me on Twitter @knottyrope
    Want to thank me? Buy my KnottyRope App here
    BES 12 and BES 5.0.4 with Exchange 2010 and SQL 2012 Hyper V

  • The Application Data folder for Visual Studio could not be created

    Hi! My laptop was working fine but someone recently installed Malware Bytes to my laptop and supposedly found 4 problems and "fixed" them afterwards Visual Studio Professional 2013 and Chrome stopped launching. When I realized this happened I uninstalled
    Malwarebytes but it was too late. Every time I tried launching Visual Studio I would get a message that said something like: "Two or more components could not be found. Please reinstall". I did a "fix" on Visual Studio but this solved nothing
    only changed the message, the new message was "The Application Data folder for Visual Studio could not be created" so I uninstalled the program and all the extras I found on my Control Panel. Downloaded Visual Studio Community 2013 I'm trying to
    install it but I got the same exact message again. Why is this happening? What does it mean? Before I uninstalled Visual Studio Professional 2013 I looked for ways others solved it but nothing seemed to work. Please help. Thanks!

    Hello Danny,
    The Malware Bytes may have already modified some files/registry values/environment variable which is used by Visual Studio and may be the setup cannot create it for you again.
    Please try the workaround here in this blog:http://tutewall.com/application-data-folder-for-visual-studio-could-not-be-created/ and remember to backup your
    registry key before you do any actions to the registry table.
    Best regards,
    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Scrolling Header works in Visual Studio but not on Report Server 2008

    2008 R2 Reporting Services. My scrolling header works in Visual Studio but not when deployed to the Report Server and viewed in IE 9. I have read most every post on this issue and can't find a solution. I have the fixed data properties
    set correctly. Any suggestions?
    Help appreciated! 
    Linda

    Hi Linda,
    As a suggestion, I would try to delete the deployed version and instead of deploying ther RDL file, i would try to upload the file and test it.
    If the issue exisit, then I would download the exisiting version from the reportserver and compare the xml versions of the two reports and check if the propoerty is getting over written while deploying.
    HTH,
    Ram
    Please vote as helpful or mark as answer, if it helps

  • Adobe form-Able to post  data using Adobe Reader 9 but not with Adobe Proff

    Hello Guru's
    I am facing one problem with adobe forms.
    We have develoed a adobe form using adobe reader 9.
    Now when user are posting the purchase requistion using the form,they are able to post the data using
    Adobe Reader 9 but not with Adobe Reader professional.
    Can anyone please advice me what can be the problem here.

    Adobe Reader 9 can't save the old FDA forms. FDA must update their forms.

  • Data appears in the tree but not in the display

    Post Author: TheBig1980s
    CA Forum: General
    Hello:
    When I print data for one month, data appears in both the Preview tree and the Preview display.  When I print the data for another month, the data does show in the Preview tree but not in the Preview display.
    Forgetting the tables the report is pulling from, forgetting which month is which, etc., why (in any case) would Crystal show data in the Preview tree but not show that same data in the Preview display?  That makes no sense.  I wish I could just take my mouse and just drag the tree onto the displayu2026..
    I have nothing suppressed.  This is Crystal 9.
    Thanks!
    TheBig1980s

    Post Author: SKodidine
    CA Forum: General
    I encounter this in CR XI once in a while.  What I found from my research, if I have a group and then I have certain conditions to either display or eliminate the data selected for whatever reason then the group tree will show the group and since the data is eliminated by either the select criteria or another way there is no data displayed.
    Try this.  In the second month where you see the data in the tree but on the report, see if you can narrow it down further by day and see if you can find the reason why.

  • When I look up the creation date for files on my Macbook I get the date and month in brackets, but not the year.  Why is this and how can I look up the year?

    When I look up the creation date for files on my Macbook (using "get info", or the information window in Iphoto) I get the date and month in brackets, but not the year.  Why is this and how can I look up the year? 

    Does the Date Modified column in a window set to List view show the date correctly, or does it also display it incorrectly?
    To add additional columns to a Finder (folder) window, with that window open and active open the View Options for it. You can do that by pressing Command-J or by selecting View Options from the View menu in the main menubar.

  • Sql query generator from xml data

    Hi,
    I am looking for an open source tool in java which would generate the sql query with an xml configuration file as input. The xml configuration file schema would be defined by the tool and and would provide placeholders for giving the various information required to build the sql query.
    Are there any available?
    Please let me know.
    Anshuk

    hi All,
    I tried below . but still no luck .
    CREATE OR REPLACE FUNCTION get_audit_trail_log(cikey IN INTEGER) RETURN blob IS
    CURSOR c_log(l_cikey INTEGER) IS
    SELECT *
    FROM PROD_SOAINFRA.audit_details atr
    WHERE cikey = l_cikey
    ORDER BY count_id;
    bl BLOB;
    BEGIN
    dbms_lob.createtemporary (bl, TRUE);
    FOR r_log IN c_log(cikey)
    LOOP
    dbms_lob.append (bl,r_log.log);
    END LOOP;
    RETURN(bl);
    END;
    =======================================
    SELECT UTL_RAW.CAST_TO_VARCHAR2(UTL_COMPRESS.LZ_UNCOMPRESS(get_audit_trail_log(ci.cikey)))
    FROM PROD_SOAINFRA.audit_details ci
    WHERE cikey = 848063749
    =======================================
    Error:
    =====================
    ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW conversion (actual: 20958, maximum: 2000)
    22835. 00000 - "Buffer too small for CLOB to CHAR or BLOB to RAW conversion (actual: %s, maximum: %s)"
    *Cause:    An attempt was made to convert CLOB to CHAR or BLOB to RAW, where
    the LOB size was bigger than the buffer limit for CHAR and RAW
    types.
    Note that widths are reported in characters if character length
    semantics are in effect for the column, otherwise widths are
    reported in bytes.
    *Action:   Do one of the following
    1. Make the LOB smaller before performing the conversion,
    for example, by using SUBSTR on CLOB
    2. Use DBMS_LOB.SUBSTR to convert CLOB to CHAR or BLOB to RAW.

Maybe you are looking for

  • Report in excel

    I have a report to be designed in pdf and excel and i am using Report Builder 10g. when the report is generated in pdf it is absolutely correct but when generated in excel, one of the repeating frame which should be displayed at second position in th

  • Files not opening in the cloud?

    I am trying to get to the photos I loaded to the cloud but only get spinning squares.

  • Why does my GPS not work???

    Please help, I am trying to use the GPS function on my blackberry 8320. when I try to activate it just keeps informing me "searching for Satalites". This is if I am indoors / outdoors / uk / central europe. I have tried speaking to orange (service pr

  • Restrict number of records in Standard Check Printing Report R12

    Hi, My client wants only 8 records to be displayed in each page.Only after all the records have been displayed the cheque should be displayed.Could someone help me with this.Iam using an RTF Please send me any related RTF or code.Its very Urgent Than

  • 802.1x not working

    I am trying to setup 802.1x on a 2960 running 12.2.53 SE2. Here is the configuration of the interface: interface GigabitEthernet1/0/9 switchport access vlan 205 switchport mode access switchport nonegotiate authentication event fail action authorize