Friday, February 24, 2012

Creating a Cursor out of results of a SP

Is it possible to create a cursor out of the results of a stored procedure.
OR
Is it possible to get just one value.
EXEC sp_columns @.table_name = 'tablename', @.column_name='columnname'
--I want the type_name valueYou can use the INFORMATION_SCHEMA.COLUMN view...

What data do you want?|||I will look at that.

I was able to create a temp table, when i figured out the right syntax, and then selected the appropriate colomn out of the temp table.|||Good for you...

SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'yourTable' AND COLUMN_NAME = 'yourColumn'

No comments:

Post a Comment