Solved

How to display a message in SQL Server

Posted on 2006-11-28
4
312 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
4 Comments
 
LVL 65

Accepted Solution

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

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how the fundamental information of how to create a table.

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now