Printing Query Results

I need to know how to print out an output grid directly from SQL Developer . When I try and do this I only get the SQL logic, but not the output data in the grid.

It is not a grid, but if you choose "Script Output" (F5) it will create a 'fixed width' file that you can print from the "Script Output" window. You can print directly or cut&paste into something like TextPad and modify it from there.

Similar Messages

  • I need to print one query result as a single row

    Hi,
    I need to print one query result as a single row ,which gives more than one value (of subinventories)and also i would like to print the quantity of that particular subinventory at particular place.Please suggest how can i do this in the report builder?

    Actually I need to print inventory report with subinventory break up.For that all subinventories of category code AB are taken as single row.Based on that subinventory value Quantity must be printed at that particular place.
    For ex
    Quantity
    Item no Description Subinventory Code AB_Abc AB_Def AB_ghi
    1 ***** 12 9
    2 ****** 8 5
    like that.I am waiting for the reply.Plz its some how urgent.
    Thank you,

  • How to display the query results in several pages?.

    Hi,
    i want to display the query results in several pages. for example my query result found 50 matches, now i want to print 20 per pages next 20 will be in next pages. iam using only jsp & mysql.
    Regards
    Chinna

    Hi, what you are trying accomplish is known as pagination.
    You could use JSTL tags with Custom Tags to perform pagination in your JSP pages.
    evnafets showed me DisplayTags , you could use those as well http://displaytag.sourceforge.net/11/tut_externalSortAndPage.html
    Here is one article on paging:
    http://www.javaworld.com/javaworld/jw-07-2004/jw-0726-pagination.html

  • Error in Query Result on ADF Table using "ROLLUP"

    Hi, I use Jdeveloper 11.1.2.3.0
    My problem is whenever i run and test my query (on SQL Developer 3.2 release) which has a "Rollup" command, it shows the accurate result with the total and subtotals in the right place as i want it..... But after configuring it on my ADF application via ADF Table, whenever i run it, the subtotals are scattered and misplaced (not being at the position they are meant to be like in SQL Developer)..........
    Please is there a possible way to correct this or is there something im not getting right?
    Please i await any good suggestions or corrections...
    Thank you.
    OBYYS.

    Hi,
    maybe you want to share how from ADF you access your query. Do you use ADF BC, EJB, POJO (with JDBC) to issue the call? If you use ADF BC, how is the value displayed in the tester? Note that SQL Developer just prints the result of a query wheras a table requires you to provide row/column values even for rows that define totals. I assume this to be your problem.
    Frank

  • BEx Map in Excel: Print only result area

    Hi experts,
    I am in BEx Map - Excel, and I am trying to print the result area ONLY, without key figures, legend and so on...
    Print Preview in Excel shows the key figures on the left, the legends on the right and a little version of the map (as if way too zoomed out) in the middle.
    I know there is a post dedicated to the "print only result area" but its solution is "web only"
    Thx,
    Olivier

    Arun,
    Attaching a map in BEx-Excel is different from attaching a chart. When attaching a map, you can't choose in which sheet/workbook the map will be displayed. A new sheet is automatically added to the workbook holding the BEx query, period.
    But thx anyway. I did try your thought

  • Query Results: Retrieve All Rows?

    I was looking for a feature that will allow me to choose to return "all records" to the Query Results window. The current behavior is to fetch 50 records at a time (e.g. fetch 50 records as you scroll through the results = s-l-o-w). What I'd like to do is "Retrieve All Rows" then use to the scroll bar to "smoothly" scroll to the last record. For example, the 8.0.6 version of Query Builder had this functionality and in SQL Developer 3.0, if I right-click on the results. I can choose to "Count Rows...", seems like this would be a perfect place to put a "Retrieve All Rows" option.

    Hi,
    My advice: do something only if there is a business case for it; satisfying your curiosity can get surprisingly expensive.
    You have already read about using Run Statement to execute a SQL statement, then Ctrl-End to auto-scroll to the end. You can try the same for Run Script, but first you will probably need to increase the value of Tools|Preferences|Database|Worksheet|Max rows to print in a script. Of course, taking either of these approaches slows things down due to displaying output and scrolling. Same with SQL*Plus. And, as mentioned previously, Java memory management in SQL Developer can cause slow downs and hangs if the result set is large enough.
    Here is a way to minimize that delay, avoid hangs, and get a more repeatable result:
    1) Save some query to, say, C:\Temp\AllCustomers.sql. For example, "select * from customers;" or "select id from customers;".
    2) Run it from a SQL Developer worksheet using Run Script (F5), or from the SQL*Plus command line, with a script like this:
    set timing on
    set termout off
    spool C:\Temp\AllCustomers.lst
    @C:\Temp\AllCustomers.sql
    spool offEven then you will see that the timing results will vary. Maybe "select *" runs much slower than "select id" because the logical output lines are long and get wrapped into multiple physical output lines in the file. Minimize that by setting linesize to a longer value (but only in SQL*Plus -- it isn't supported in SQL Developer) and repeat the test to see. Maybe SQL*Plus runs it much faster than SQL Developer because one is a command line environment and the other a GUI tool with more overhead. Or maybe the SQL Developer JVM is near its size limit and lots of Java garbage collection is slowing it down. Simple question, complicated answer.
    Regards,
    Gary
    SQL Developer Team
    P.S.: And if by chance you are using a version of SQL Developer so old it does not include the output time in the query result tab's toolbar, using Run Script with set timing on is your only recourse.
    Edited by: gggraham on Oct 27, 2011 4:54 PM

  • Query Result Filtered using User Roles SCSM 2012 R2 RU2

    Hi,
    I have a Query Result setup in a Request Offering that shows the list of Printers using the Printer CI. We have different sites with printers that start with the site location like MTL. There are no filters in the Query Result. What i did is create a Group
    for each site that has the rule "start with" MTL (other groups have other 3 letter prefix). Then i created a user role for each group and only selected the Printer group for the site and i associated the User Role with our AD Site group called MTL-User.
    i did this for each site. Now when i checked the Request Offering at first, with a user that is part of MTL-User group, it showed only the list of printers that started with MTL. Now today i came to check again and the same user is seeing all the printers
    and not just the ones that start with MTL.
    The User Role i made was based on the Read-Only Operator. I just dont know what the problem is

    Thanks for that link. I had thought of something like that but i found it came to the same thing as just using the filter field that is already available when using a Query Result. I retried using User Roles and figured out that the problem is that my test
    user is only part of the MTL-USER group so when i logged in with him into the portal (cireson Portal btw) i would see the proper result. If i logged in with a actual user that is also part of other groups besides MTL-Users, they see all the printers no matter
    which AD group i define in the User Role. 
    So what i figured was that my group is not getting applied as the filter to the query Result and that the Member section in the User role is only to say who can see the Query result list. But then i have my test user for which this setup works...so im confused
    on what exactly is overriding the results.

  • Security Audit Log / Logging of downloads from query results?

    Hi everybody,
    our data protection team has raised the requirement to log all data downloads from our BW system. As far as I know, it is possible to log downloads in SAP GUI using Security Audit Log, but does this also cover "Export to Excel" functionality of query results executed in the portal? And what about execution of queries with BEx Analyzer? I doubt, if that tool would log this. Are there any other tools available to cover that requirement?
    Any comment and idea is welcome. Thanks in advance!
    Regards,
    Carsten

    If restricted to ALV I think it can be done, but even there... if the user executes it in background and mails or prints the spool request then the cat is out of the box...
    Moral of the story: Do not grant access if the user should not be able to see the data (regardless where they log on from).
    That you cannot monitor / log all (mass) download events is however a bit unfortunate, however once the data is outside of the system for those whom you do trust then you anyway need to train them not to park sensitive files on project or public file servers.
    IMO the main problem here is front-end computing tools (like Excel, etc) which the users feel more confortable with to analyze data than the server side analytics tools (e.g. in the ALV task bars, or even the BOBJ Dashboards which are very "user-sentric").
    In German it is known as "Bauern mentalität" (farmer mentality) which generally resides at the application surphase layer in the greater scheme of things:
    -> You do not eat anything you have not slaughtered yourself... 
    Specifically regarding tokenization, you can consider not displaying the data in the portal. If the user wants to display these fields they have to navigate in their own context into the backend system to retrieve the token and then only display individual values.
    --> A download of a list via the portal or BEX excludes these fields which the user can access, but not mass download.
    I think this is possible, but it will be a challenge depending on whether the fields support tockenization. Credit Card numbers as mentioned my Martin is fairly vanilla and already used.
    Custom fields&types, insufficiently critical elements and older programs will be a bigger challenge.
    Please provide more details, as the generic answers are not well take care of IMO. If you cannot provide mre details, then SDN discussions speculating on answers is not efficient either...
    Cheers,
    Julius

  • How to Edit Query Result of Simple Search Panel

    Hi Experts,
    I have a question regarding Simple Search Panel.
    I have made a VO that select a table which contained data like this:
    Name | Skill | Status
    Rooney | Shooting | A
    Rooney | Heading | B
    Rooney | Running | B
    Van Persie | Shooting | A
    Van Persie | Heading | C
    Van Persie | Running | B
    I successfully made a Simple Search Panel which showing all the data from that VO.
    But my requirement is I want to make a grouping of that search result, so it should be showing like this:
    Name | Skill | Status
    Rooney | Shooting | A
    - - - - - - | Heading | B
    - - - - - - | Running | B
    Van Persie | Shooting | A
    - - - - - - | Heading | C
    - - - - - - | Running | B
    As long as it is the same person with the row above, it won't print the name of the person.
    Could you please give me a pointer about this?
    Thanks in advance,
    Rheza
    Edited by: 893922 on Feb 19, 2013 3:13 AM

    Hi expert,
    My requirement is I need to override the query result from Simple Search Panel.
    The data that I provided above was just for simplify the example.
    One of my requirement is:
    - when the "status" column value is 0, I need to override this and show an image of image0.jpg
    - when the "status" column value is 1, I need to override this and show an image of image1.jpg
    Any pointers about this will be so much appreciated.
    Thanks,
    Rheza
    Edited by: 893922 on Mar 6, 2013 7:26 PM

  • Getting query results from a PL/SQL procedure

    Hi! So, I’m a little stumped and I can’t seem to find the answer to what I believe is probably a simple question…
    So, here goes… I have a big ol’ union query that I use to create a report on a page, it’s about 25k – not over the 32k limit, but fails to be able to compile every time (I always get a 400 – Bad Request error). I’m not sure why this is happening, but I can remove a union statement and it compiles just fine – so it has something to do with the size of the query. ANYWAY – I’ve resolved that I should put this bad boy into the database as a stored procedure and just call it from Apex, my problem is I can’t figure out quite how to do this with variables, etc.…
    Instead of giving you my whole big query, I’ll use the emp table as the concept is the same:
    Say we have a query that creates a report on a page:
    select empno, ename, job, mgr, hiredate, sal, comm, deptno
    from emp
    where job = :P_JOB
    and hiredate >= :P_HIREDATE;
    How would I take this query, create it as a stored procedure on the db, pass the variables from Apex and return the query result set from the stored proc as a report?
    I really appreciate any help on this!
    Best,
    Gilcrest

    Hi Gilcrest,
    You should create the query as a View and use the view name and the WHERE clause in the report's sql source.
    Andy

  • Sending email using PL/SQL based on a query result

    Hello all,
    I want to create a procedure using PL/SQL, based on a query result.Here is the scenario:
    I have multiple tables in Target and Source databases that I want to compare(not the whole table but queries on these tables) and if they differ, I want to shoot an email. I have some ideas how to implement this but not sure whether it is the best approach.
    select Acct_id, total from SourceTableA
    minus
    select Acct_id, total from TargetTableA
    select Acct_id, sum from SourceTableB
    minus
    select Acct_id, sum from TargetTableB
    If the result of any of above queries > 0 then I want to shoot an email and want to repeat this procedure in the morning every day.
    I know how to implement send_mail procedure using UTL_SMTP package and how to schedule tha job by dbms_job package. But I am not sure how to implement the result of minus query. In case if minus > 0 then I also want to send the name of tables in the email message where source and target tables are not same. Should i use cursor, variable or insert the result in a new table? any help would be highly appreciated. Thanks in advance.
    Khan

    Actually these queries are the part of our daily testing that we run everyday manually(after the scheduled ETL load) to see if there are any discrepencies between our datawarehouse tables and source tables. So instead of running these queries manually everyday we want to schedula a procedure that will shoot an email in case of any discrepency and indicate which tables have problems.

  • How can I get Numbers to return the first row in a group of VLOOKUP query results instead of last one?

    I'm trying to query from one table (call it Table1) a batch of rows in another table (Table2) using VLOOKUP on a date specified in the first table (Table1). My problem is it's returning the last incident in Table2 of the requested date instead of the first incident. This really breaks the OFFSET scheme I'd like to use to collect the rest of the items for that date. Is there some way to compel VLOOKUP to return the first row of query results, not the last?
    NOTE: I see I've asked this before, but forgot to go back and look at responses given. It's been a while and I've limped along until now with the way things were. I'm actually trying to delete this questions, so if you see it, ignore it. I suppose if someone can tell me real quick how to delete a stupid question, that might be helpful.

    you cannot delete a post yourself.  You can flag the post an request a moderator remove.

  • Warning Message in query result as 'Notification Number DBMAN 345'

    Hi ,
    I have a warning message while executing the query
    'Diagnosis
    Currently, it cannot be guaranteed that SIDs and master data exists for all characteristic attributes for the DataStore object to be read.
    There is a restriction on a navigation attribute of the listed characteristic in the query. This filters all characteristic values of the master-data bearing characteristic for which there is not yet master data out of the result.
    For performance reasons, this filtering is unavoidable.
    System Response
    Procedure
    In case of doubt, find other restirctions directly on the characteristic values of the characteristics contained in the DataStore object.
    Procedure for System Administration
      Notification Number DBMAN 345  '
    'i am getting this error because of cutomer exit variables  on navigatioanl attributes of  Omaterial'
    I tried supressing it in  RSRT.. but unable to find the message.
    I tried  debugging and assigning enhancement points in  FM  BAL_LOG_MSG_READ.. As it is standard function module its not suggestable to do..
    can we creat custom FM ?? will it be called if we  write code to supress warning message??
    Please let me know how to use  BADI'S  in order to supress the error message that appearing in query result?
    Thanks All.

    Hi,
    The warning is raised due to the following reasons:
      - you have a selection in the filter of a navigation attribute
      - in your DSO you do not use the option "SIDs Generation upon Activation"
    If the option "SIDs Generation upon Activation" is not flagged,
    you may get char.values for an Infoobject in the system not
    having any SIDs. As a result you may see in the report less data as
    expected.
    For example we have Infoobject A with its Nav.attribute B
      Infoobject A   Nav.attribute B
      12             13   ->> has a SID in the X-table
      11             10
      9              13   ->> has no SID in the X-table
    If you define a selection on B =13 in the query, you only get infoobject
    A with key 12 displayed in the result, since only B =13 has a SID
    in the relevant X-table.
    The warning refers to this behaviour and cannot be avoided unless you:
       - flag the option in the ODS-settings
       - or remove the filter defined on 0MATERIAL__xxxx
    Thanks,
    Venkat

  • Saving query results to a flat file

    Hello Experts!
    We have a very specific issue on our current project and I would like to know if any of you have ever done something similar. We are taking query results from BW (after complex calculations, some based on SY-DATE) and saving them to flat files to transfer to a SQL database structure on the Enterprise Portal. From here, the portal team renders the information into more "static" dashboards that include mouse over features and even limited drilldown (i.e. no matter where a user clicks the report always drills down on profit center)
    There are many reasons why the model is set up as such (mostly training of executive level end users), and even though it doesn't mesh with the idea that BW could do this work on its own, we have to work with what we have.
    We have come up with 3 possible ways to save this data to flat files and hopefully someone can tell us which might be the most effective.
    1.) Information Broadcasting. If we broadcast XML files to the portal, will the portals team be able to read that data into a SQL database? Is there another way to use broadcasting to create and send a flat file to specific location?
    2.) RSCRM_BAPI. This transaction seems to not support texts.
    3.) Open Hub. In order to get the open hub to work, we first have to save all of our query results to direct write data store objects using APD. (calculations based on current date, for example, would require daily full loads to the underlying data providers otherwise.)
    What is the best way to accomplish this? Is information broadcasting capable of doing this?
    Thanks!

    Hi Adam,
    Do you have to use flat files to load the information to a SQL database? (if so maybe someone else has a suggestion on which way would be the best).
    I try to stay away from flat file uploads as there is a lot of manual work involved. May I suggest setting up a connection to your SQL table in the DBCON table and then writing a small abap program to push data into the SQL database (which you can automate).
    1) Use APD to push data into a table within BW.
    2) Go to transaction SM30 > table DBCON and setup a new entry specifying the conncection parameters to your SQL database.
    3) In SE38 Write an ABAP program along the folloing lines (assuming the connection you set in DBCON is named conn1:
    data: con_name like dbcon-con_name
    con_name = 'conn1'.
    exec sql.
      set connection :con_name
    endexec.
    ****have a select statement which reads data from your table which the data is saved from the APD into an internal table**********
    ****loop on the internal table and have a SQL insert statement to insert the records into the SQL table as below******
    exec sql.
    insert into <SQL TABLE> (column names seperated by ,)
    values (column names of the internal table seperated by ,)  if the internal table is named itab the columns have to be specified as :itab-column1
    If you decide to take this approach you may find more info on DBCON and the process in sdn. Good Luck!
    endexec.

  • Large query result set

    Hi all,
    At the moment we have some java classes (not ejb - cmp/bmp) for search in
    our ejb application.
    Now we have a problem i.e. records have grown too high( millions ) and
    sometimes query results in retrieval of millions of records. It results in
    too much memory consumtion in our ejb application. What is the best way to
    address this issue.
    Any help will be highly appreciated.
    Thanks & regards,
    Parvez

    you can think of following options
    1) paging: read only few thousands at a time and maintain a index to page
    through complete dataset
    2) caching!
    a) you can create a serialized data file in server to cache the result set
    and can use that to browse through. you may do on the fly
    compression/uncompression while sending data to client.
    b) applet based solution where caching could be in client side. Look in
    http://www.sitraka.com/software/jclass/cs_ims.html
    thanks,
    Srinivas
    "chauhan" <[email protected]> wrote in message
    news:[email protected]...
    Thanks Slava Imeshev,
    We already have search criteria and a limit. When records exceeds thatlimit
    then we prompt user that it may take sometime, do you want to proceed? If
    he clicks yes then we retrieve those records. This results in lot ofmemory
    consumtion.
    I was thinking if there is some way that from database I can retrieve some
    block of records at a time rather the all records of a query. I wander how
    internet search sites work, where thousnds of sites/pages match criteriaand
    client can move back & front on any page.
    Regards,
    Parvez
    "Slava Imeshev" <[email protected]> wrote in message
    news:[email protected]...
    Hi chauhan,
    You may want to narrow search criteria along with processing a
    limited number of resulting records. I.e. if the size of the result
    is bigger than a limit, you stop fetching results and notify the client
    that search criteria should be narrowed.
    HTH.
    Regards,
    Slava Imeshev
    "chauhan" <[email protected]> wrote in message
    news:[email protected]...
    Hi all,
    At the moment we have some java classes (not ejb - cmp/bmp) for
    search
    in
    our ejb application.
    Now we have a problem i.e. records have grown too high( millions ) and
    sometimes query results in retrieval of millions of records. It
    results
    in
    too much memory consumtion in our ejb application. What is the best
    way
    to
    address this issue.
    Any help will be highly appreciated.
    Thanks & regards,
    Parvez

Maybe you are looking for