Solved

SQL to show output results

Posted on 2011-02-19
3
432 Views
Last Modified: 2012-05-11
I have prepared a sql file mysql.sql

Satement1
Go
Statement2
Go

When I run in SSMS, I want to see each batch followed by its
results:
Statement 1
Go
Results from above batch 1
Statement2
Go
Results from above batch 2


Is there a way to get this output? In Oracle one can use "SET ECHO ON"/"SET FEEDBACK ON"

Is there anything equivalent in SQL server?

Thanks,

~sve
0
Comment
Question by:sventhan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 18

Author Comment

by:sventhan
ID: 34934289
I've to capture this in SQLCMD. So we could verify our deployment.
0
 
LVL 23

Accepted Solution

by:
Racim BOUDJAKDJI earned 500 total points
ID: 34934412
simply wrap up the two statement in one then SQL  will return the outputs in one run.
0
 
LVL 18

Author Closing Comment

by:sventhan
ID: 34956209
Thanks.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Via a live example, show how to take different types of Oracle backups using RMAN.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

697 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question