Sending a list of rows to retreive to stored proc

  • Hya!

    Is it possible to send a parameter with a list of rows (like an array) to a stored procedure? Then the SP would retreive the rows in the list. I think I know a way to do this but I wonder if there is a built in function in SQL server...

    Thank you!

    /Tomi

    Edited by - tomiz on 07/28/2002 2:19:08 PM

  • Not easily. You can send over a delimited string as one param then parse it out and push into a temp table used by the proc. Or multiple params to do the same thing. Cleanest solution I have seen is to send it over as an XML doc and use OpenXML (SQL2K only) to treat it as a table.

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

  • Thanks Andy!

    Ok, then... I'll do it in another way

    /Tomi

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply