Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Label will not show string value

Author  Topic 

Jay123
Yak Posting Veteran

54 Posts

Posted - 2010-05-09 : 11:13:09
I cannot get a label to show a string value.

It keeps showing the string instead of the value.

for example say the column thisOne and three rows each with a value of 1.

the string i want is say. select sum(thisOne) from thisTable.
This should result in the value of "3"

But all i get is the string "select sum(thisOne) from thisTable"

I have tried too many ways to list.

So can someone just tell me How to get this to work properly. Thanks.

DBA in the making
Aged Yak Warrior

638 Posts

Posted - 2010-05-09 : 15:39:51
Where exactly are you putting this query?

------------------------------------------------------------------------------------
Any and all code contained within this post comes with a 100% money back guarantee.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-05-10 : 03:50:27
If you used dynamic sql, you should have used exec instead of print

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-05-10 : 13:32:37
anyways it would be good to post your query.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -