0

I have a script like below that when I run, the result output separates the two Select statements into 2 result sets. How do I run so that the output of the second Select statement is appended onto the bottom of the first? I've checked this post and this post but they're for Oracle and don't seem to work for me with Sybase-ASE.

SELECT " ", BizDate, " ", getdate(), "North America"
FROM #BizDateTemp

Select *
From SalesTable
Where BizDate = getdate()

Desired result:

-----------------------------------------------------
|   | 12/13/2016|     |  12/13/2016 | North America | 
-----------------------------------------------------

-----------------------------------------------------
|   Sale Item   |   QTY   |   PRICE   |   BizDate   |
-----------------------------------------------------
|   plankton    |  1,000  |  $60,000  |  12/13/2016 |

What happens now:

-----------------------------------------------------
|   | 12/13/2016|     |  12/13/2016 | North America | 
-----------------------------------------------------

separated from :

-----------------------------------------------------
|   Sale Item   |   QTY   |   PRICE   |   BizDate   |
-----------------------------------------------------
|   plankton    |  1,000  |  $60,000  |  12/13/2016 |
Community
  • 1
  • 1
plankton
  • 369
  • 5
  • 21

1 Answers1

1

The new "Toad for SAP Solutions" can display multiple query results in one single windows:

1) To enable view of all Result Sets in one Tab: Check Options | Database | Script results | Enable all results view

2) Run you query

3) Review all (or the selected Result sets) in one Result Sets tab: Left-click and hold Shift to select more than one Result sets of your script. Select All results to review all in one tab.

Vince
  • 734
  • 1
  • 5
  • 10
  • I have Toad for Sybase 2.1.0.2921. I don't see "Enable all results view" as an option. I can either do "All in one tab" or "One tab per query" for Script Result Grouping. I'm currently in "All in one tab". I tried the shift click but it didn't work. – plankton Dec 13 '16 at 20:49
  • 1
    as I said this is only in the new version of TOAD for Sybase called TOAD for SAP Solutions. You can download the freeware version and test it. – Vince Dec 13 '16 at 21:32
  • I asked the Toad people this question and they explained that Toad for SAP is the newer version of Toad for Sybase. I would need to move to the newer version. Thanks! – plankton Dec 14 '16 at 14:56