Reputation: 41
I am trying to get sql query output in DBfit using i.e. !|Execute|select * from abc|
but don't know how it will display in DBfit.
Upvotes: 4
Views: 6169
Reputation: 1234
I think that you are looking for the Inspect Query
table (you can find reference docs about it here).
!|Inspect Query|select * from abc|
When executed, this will print the resultset of the query.
Upvotes: 7
Reputation: 36708
First, the execute fixture is typically used for actions that do not return data, e.g.:
!|Execute|insert into tablename values (…)|
or
!|Execute|update tablename st... where...|
However, even some non-data actions have more specific commands. The above update can be done with, for example, with:
!|Update|tablename |
|field_to_change=|field_to_select|
|new value |matching value |
For returning data, use the query fixture
!|query|select Id, BatchNum from tablename|
|Id |BatchNum? |
|1 |>>Bat1 |
|2 |<<Bat1 |
As shown, just put your field names in the row below the fixture, then your data rows below that.
Upvotes: 4