I Want To Print Two Variable?????????????? [Resolved]

Posted by Sabarimahesh under Sql Server on 3/27/2012 | Points: 10 | Views : 39028 | Status : [Member] | Replies : 11
i want print two values in Sql

Example
Two Variables are
@Name
@Cid1

print @Name,@Cid1


How it is ....

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M



Responses

Posted by: Rajni.Shekhar on: 3/27/2012 [Member] Bronze | Points: 50

Up
0
Down

Resolved
you can not print a table, you can print variable and select a table.

Limit to print: 8,000 characters long for message string (non-unicode string)
4,000 characters long for unicode string
and longer strings are truncated.

for more info about it follow below link

http://msdn.microsoft.com/en-us/library/ms176047.aspx

Thanks,
Rajni Shekhar

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 3/27/2012 [Member] Silver | Points: 25

Up
0
Down
Hi

declare @Name varchar(30) ,@Cid1 varchar(100)

set @Name='sss'
set @Cid1 ='kkkk'
print @Name+@Cid1

Thanks,
Sanjay

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 3/27/2012 [Member] Bronze | Points: 25

Up
0
Down
Sksamantaray

Ok if

i Have Variable in Two Different data type

Then it is possible




Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 3/27/2012 [Member] Silver | Points: 25

Up
0
Down
Yes,possible


declare @Name varchar(30)
Declare @Cid1 int

set @Name='sss'
set @Cid1 =12
print @Name+convert(varchar,@Cid1)


Thanks,
Sanjay

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 3/27/2012 [Member] Bronze | Points: 25

Up
0
Down
Sksamantaray

How We Can form like Table While printing



Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 3/27/2012 [Member] Bronze | Points: 25

Up
0
Down
Sksamantaray

There is any limit of variables to print ???

or

Multiple Of Variables ,We can Print But any limit like that

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 3/28/2012 [Member] Bronze | Points: 25

Up
0
Down
Rajni.Shekhar

tHANK yOU sO mUCH

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajni.Shekhar on: 3/28/2012 [Member] Bronze | Points: 25

Up
0
Down
Hi Sabarimahesh,

If it helped you, plz mark as answer.

Thanks,
Rajni Shekhar

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patel28rajendra on: 3/28/2012 [Member] Starter | Points: 25

Up
0
Down
Hi

Sksamantaray

Nice explanation

R D Patel

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 3/28/2012 [Member] Silver | Points: 25

Up
0
Down
Thanks Rajendra.

Thanks,
Sanjay

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Longwest on: 7/2/2015 [Member] Starter | Points: 25

Up
0
Down
Thank you, Rajni.
Your post is of great help.

Best regards.
http://www.keepdynamic.com/

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response