Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2004
    Posts
    6

    Exclamation Unanswered: 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 value

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    You can use the INFORMATION_SCHEMA.COLUMN view...

    What data do you want?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Apr 2004
    Posts
    6
    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.
    Last edited by danielamiller; 04-28-04 at 17:24.

  4. #4
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Good for you...

    SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'yourTable' AND COLUMN_NAME = 'yourColumn'
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •