views:

349

answers:

3

Can we see the values (rows and cells) in a table valued variable in SQL Server Management Studio (SSMS) during debug time? If yes, how?

+3  A: 

Just use the select query to display the table varialble, where ever you want to check.

http://www.simple-talk.com/sql/learn-sql-server/management-studio-improvements-in-sql-server-2008/

solairaja
Yes agreed best and quickest option. Just do this and highlight and execute only the SQL you wish to run if you need more control.
Jammin
Use select query where, in watch window?
Faiz
use the select inside the procedure or any adhoc query which your are executing
solairaja
But what I need to test is a table valued function and it throws the error "Select statements included within a function cannot return data to a client". Is there any other way, specially to examine via debugging tools provided?
Faiz
kindly show ur sql code
solairaja
SQL is too big to paste here. But it doesn't matter. What I am looking for is a way to find out values using debug GUI just like values shown in WATCH window.
Faiz
check out the link i have given - in that before summary they have given it clearly how to debugg the sql procs or functions
solairaja
See the @dbs_table variable in Locals window, in [the image](http://www.simple-talk.com/iwritefor/articlefiles/548-image032.jpg) there in the URL you have given, I need to view the data in that. Nice post though!
Faiz
have you viewed the table variable details ? is this resolved your question or not ?
solairaja
No that doesn't resolve the question. I think this is not possible without any additional plugins.
Faiz
A: 

I have come to the conclusion that this is not possible without any plugins.

Faiz
I saw some previews of Visual Studio 2010. Very fancy, complex, and detailed... and the demonstrator did not know if temp tables could be viewed in debug mode. Maybe when it's released, but I'm not holding my breath.
Philip Kelley
But I need to look in to table variables...
Faiz
A: 

That's not yet implemented according this Microsoft Connect link: Microsoft Connect

rortega