• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 215
  • Last Modified:

how to print value of variable

i use something like:

declare @user nvarchar(50)
set @user = select value from mytable

how do I then print the value of @user to the screen. I've seen it done but can't remember how.
0
riaancornelius
Asked:
riaancornelius
  • 2
  • 2
  • 2
1 Solution
 
OtanaCommented:
declare @user nvarchar(50)
select @user = value from mytable
select @user
0
 
Thandava VallepalliCommented:
declare @user nvarchar(50)
set @user = select value from mytable
print @user

itsvtk
0
 
riaancorneliusAuthor Commented:
there's another way. in QA you you can output  to 'messages' not 'grids'
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Thandava VallepalliCommented:

declare @user nvarchar(50)
select @user = value from mytable
print @user

itsvtk
0
 
OtanaCommented:
In that case, use print like itsvtk said.
0
 
riaancorneliusAuthor Commented:
declare @user nvarchar(50)
select @user = value from mytable
print @user

sorry didn't see this. thanks
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now