Link to home
Start Free TrialLog in
Avatar of Jenkins
JenkinsFlag for United States of America

asked on

How to display a message in SQL Server

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?
ASKER CERTIFIED SOLUTION
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
> 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))
Avatar of gpompe
gpompe

select "CheckIt value is: " + @CheckIt
Do you mean something like this

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