Topic
  • 6 replies
  • Latest Post - ‏2013-12-17T08:42:35Z by YuanFeng
frs
frs
20 Posts

Pinned topic How to export the complete result set from a SQL query, not just 500 rows

‏2010-01-22T12:59:55Z |
Data Studio 2.2.0.1 allows me to export all the rows of a table or view by right-clicking on the object and selecting Data->Extract. Is there a similar way to export a complete result set from a SQL query? My current workaround is to temporarily create a DB2 view that contains the query and then extract from that view.
Updated on 2010-01-26T22:07:00Z at 2010-01-26T22:07:00Z by frs
  • SystemAdmin
    SystemAdmin
    1632 Posts

    Re: How to export the complete result set from a SQL query, not just 500 rows

    ‏2010-01-23T01:29:08Z  
    In the SQL Results view >Result1 tab, right-click on the results table >Export (or Save if you want a text file). You will be asked to fill in the file name and output format of the export, as well as encoding options.
  • frs
    frs
    20 Posts

    Re: How to export the complete result set from a SQL query, not just 500 rows

    ‏2010-01-24T05:10:10Z  
    In the SQL Results view >Result1 tab, right-click on the results table >Export (or Save if you want a text file). You will be asked to fill in the file name and output format of the export, as well as encoding options.
    I appreciate the quick reply. Unfortunately, I still only see the first 500 rows when I attempt to save or export the result set. Is there some way to enable all rows of the result set to be returned instead of just the first 500 rows?
  • SystemAdmin
    SystemAdmin
    1632 Posts

    Re: How to export the complete result set from a SQL query, not just 500 rows

    ‏2010-01-26T17:09:27Z  
    • frs
    • ‏2010-01-24T05:10:10Z
    I appreciate the quick reply. Unfortunately, I still only see the first 500 rows when I attempt to save or export the result set. Is there some way to enable all rows of the result set to be returned instead of just the first 500 rows?
    In Window >Preferences >Data Management >SQL Results View Options, change the Max Row Count to a number >500. Note that this value is an optimized value, so changing it to a higher number may degrade performance.
  • frs
    frs
    20 Posts

    Re: How to export the complete result set from a SQL query, not just 500 rows

    ‏2010-01-26T22:07:00Z  
    In Window >Preferences >Data Management >SQL Results View Options, change the Max Row Count to a number >500. Note that this value is an optimized value, so changing it to a higher number may degrade performance.
    Thanks, Marichu. That was the answer I was looking for.

    Regards,

    Fred
  • Arthur_Adams
    Arthur_Adams
    2 Posts

    Re: How to export the complete result set from a SQL query, not just 500 rows

    ‏2013-09-25T11:07:38Z  
    In Window >Preferences >Data Management >SQL Results View Options, change the Max Row Count to a number >500. Note that this value is an optimized value, so changing it to a higher number may degrade performance.

    I appreciate why the limit is there, but increasing the Max Row Count so that all of the rows can be exported and then resetting it for subsequent scripts is very clumsy. Would it be possible to have an additional option on the Export menu that would allow all rows to be exported regardless of the Max Row Count value?

  • YuanFeng
    YuanFeng
    81 Posts

    Re: How to export the complete result set from a SQL query, not just 500 rows

    ‏2013-12-17T08:42:35Z  

    I appreciate why the limit is there, but increasing the Max Row Count so that all of the rows can be exported and then resetting it for subsequent scripts is very clumsy. Would it be possible to have an additional option on the Export menu that would allow all rows to be exported regardless of the Max Row Count value?

    We do have Export->All results in latest data studio.We also do more improvement in this area.

    Hops it will help you.