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
2009-12-14 13:21:41
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
2009-12-14 13:23:00
Use select query where, in watch window?
Faiz
2009-12-14 13:36:38
use the select inside the procedure or any adhoc query which your are executing
solairaja
2009-12-15 03:40:39
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
2009-12-15 05:23:44
kindly show ur sql code
solairaja
2009-12-15 05:55:11
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
2009-12-15 07:46:58
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
2009-12-15 08:23:41
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
2009-12-15 09:26:54
have you viewed the table variable details ? is this resolved your question or not ?
solairaja
2009-12-15 12:37:02
No that doesn't resolve the question. I think this is not possible without any additional plugins.
Faiz
2009-12-24 04:54:07
A:
I have come to the conclusion that this is not possible without any plugins.
Faiz
2010-01-06 17:21:12
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
2010-01-06 17:25:25
A:
That's not yet implemented according this Microsoft Connect link: Microsoft Connect
rortega
2010-10-21 11:44:56