Question: When I try this query it works:

```
SELECT *
FROM tbl_Users
WHERE UserId IN (555, 3695, 8787))

```

But when I put it in stored procedure it get value only if I pass one ID. If I pass more ID's 

I got nothing returned from database:

```
CREATE PROCEDURE myStoredProcedure
    @m_UserIdList varchar(500)
AS    
    SELECT u.*, p.*
    FROM tbl_Users u 
    INNER JOIN tbl_Bunker b 
    ON u.BunkerId = b.Bunker
    WHERE u.UserId IN (@m_UserIdList)

```

Answer: 
Shark explained it better than I was going to. If I remember right you can do this, but it's been a long time since I had to do what you are after so I might be wrong.

```
EXEC('SELECT u.*, p.*
      FROM tbl_Users u 
      INNER JOIN tbl_Bunker b ON u.BunkerId = b.Bunker
      WHERE u.UserId IN (' + @m_UserIdList + ')')

```
`@m_UserIdList` is a `VARCHAR(500)`, not a list of values, so this will not work. You can try and parse the passed in string into a table (and there are plenty of ways of doing so - just search this site).

However, since you are using SQL Server 2008, you should take a look at [table valued parameters](http://msdn.microsoft.com/en-us/library/bb510489.aspx) - these allow you to pass a table of values to a stored procedure.