Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2013
    Posts
    1

    Unanswered: Problem while Spooling Query Output

    Hi,

    I am trying to run a query to extract data from a linked access datatable through toad.

    The table that the query needs to sift through has over 12 Lakh rows and 70 columns. I am running a simple select query and sql gives me an error saying out of memory.
    So, I spooled the results into a CSV file. While the query seems to be running fine(I broke it in between to check how its working), the results it gives me are in a weird format.

    Suppose there are 10 columns 1-10 and 20 rows in my result set, so my CSV file would display

    1
    2
    5
    6
    7
    8
    9
    10
    3
    4

    for every row,i.e., it is showing the values for each result row one below the other(in different rows) and is appending all the rows below each other so for the current example, it would give me a dataset with one column, and 10*20 rows.

    Also, it skips three columns from the result rows and then adds them in the end of the row instead, ie. changes the order of the columns.


    Kindly help me exctract the data in a more sensible form.

    Thanks

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    As you use TOAD, there's no need to "spool" anything - simply run your SELECT statement, right-click the Data Grid pane, choose "Export dataset" and ... well, export it into a format you find the most appropriate.

  3. #3
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool

    Quote Originally Posted by princess163 View Post
    Hi,

    I am trying to run a query to extract data from a linked access datatable through toad.
    . . . E t c . . .
    Also, it skips three columns from the result rows and then adds them in the end of the row instead, ie. changes the order of the columns.
    . . . E t c . . .
    If in toad you execute "as script" it will behave like sql*plus, where you need to set the line length, pages, etc...also it may wrap the text and generate many column headers.

    As Littlefoot mentioned, execute the query and export the data grid.
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

Tags for this Thread

Posting Permissions

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