Solved

How to display a message in SQL Server

Posted on 2006-11-28
4
320 Views
Last Modified: 2008-02-26
Hi.  I have a variable named @CheckIt.  I want to be able to display a message saying "CheckIt value is: "  followed by the value in the variable. Does anyone know how to code this in SQL Server?
0
Comment
Question by:dbfromnewjersey
[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
4 Comments
 
LVL 66

Accepted Solution

by:
Jim Horn earned 125 total points
ID: 18031198
SELECT  'CheckIt value is:', @CheckIt
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 18031200
> I want to be able to display a message
where?

I guess that you only want this:

print 'CheckIt value is: ' + cast(@checkit as vachar(20))
0
 
LVL 9

Expert Comment

by:gpompe
ID: 18031201
select "CheckIt value is: " + @CheckIt
0
 
LVL 20

Expert Comment

by:Sirees
ID: 18031211
Do you mean something like this

PRINT 'CheckIt value is:' + Convert(Varchar(10),@CheckIt)
0

Featured Post

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

623 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