function!

  • Hi all,

    I don;t know but I am trying to use user defined fuction and want to use id in diffrent table and get result. but want to user multipe entry for @key in (select key from testtable)

    how can i do that?

    Thanks

  • I have no clue what you are talking about...

    Can we have the tables definition, sample data and expected output please ?

  • Do you mean that the variable @key, which is a varchar of sorts, would have several IDs in it such as

    @key = '1, 2, 3, 4, 5' and you would want to retrieve rows with key = 1, key = 2, etc.

    If so, do a search on this site (or maybe in google) for "Arrays and lists in SQL Server" - many articles have been written about it.  Adam Machanic (sorry if spelling is wrong) wrote a good one that is often referred to.

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

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