用于SYBASE ASE的TOAD SQL-执行多个选择语句

时间:2016-12-13 19:56:18

标签: sql sybase-ase toad

我有一个类似下面的脚本,当我运行时,结果输出将两个Select语句分成2个结果集。如何运行以便将第二个Select语句的输出附加到第一个Oracle语句的底部?我已经检查了this postthis post,但它们是Sybase-ASE,而SELECT " ", BizDate, " ", getdate(), "North America" FROM #BizDateTemp Select * From SalesTable Where BizDate = getdate() 似乎对我无效。

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

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

期望的结果:

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

现在发生了什么:

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

分开:

Started GET "/uploads/photos/1/image.jpg" for ::1 at 2016-12-13 14:36:42 -0500
DEBUG: Chewy strategies stack: [2] <- atomic @ /Users/kalyanmaddu/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/chewy-0.8.4/lib/chewy/railtie.rb:17
ActionController::RoutingError (No route matches [GET] "/uploads/photos/1/image.jpg"):
  actionpack (4.2.6) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
  newrelic_rpm (3.15.2.317)
...

1 个答案:

答案 0 :(得分:1)

新的“Toad for SAP Solutions”可以在一个窗口中显示多个查询结果:

1)要在一个标签中启用所有结果集的查看: 检查选项|数据库|脚本结果|启用所有结果视图

2)运行查询

3)在一个“结果集”选项卡中查看所有(或选定的结果集): 左键单击并按住Shift键以选择脚本的多个结果集。 选择所有结果以在一个选项卡中查看所有结果。