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 |
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.