Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2003
    Posts
    5

    Unhappy Unanswered: write into a grid (plsql)

    Hello,

    ive a problem in pl/sql: well, i read my data with a cursor which stands in my function. The problem is that i only now the dmbs.putline command but i want also show the data in a grid! Exists a command for this action?

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: write into a grid (plsql)

    This is not something you can do in PL/SQL directly. A client tool can select data and display it in a grid in various ways (e.g. HTML tables, GUI grid controls etc.). What you can do easily is write the data to file in CSV (comma-separated values) format, and then open the file in Excel (or some other spreadsheet program). For example:

    SET PAGESIZE 0
    SELECT deptno||',"'||dname||'","'||loc||'"' from dept
    SPOOL test.csv
    /
    SPOOL OFF

    The output written to test.csv looks like this:
    10,"ACCOUNTING","NEW YORK"
    20,"RESEARCH","DALLAS"
    30,"SALES","CHICAGO"
    40,"OPERATIONS","BOSTON"

    Open that in Excel, and you will get a column for each selected column.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •