Quantcast
Viewing all articles
Browse latest Browse all 10045

IN Operator Parameter using stored procedure

Hi Guys,
I'm running a reporting services report using stored procedure and I'm facing a dilemma with the IN Operator in the stored procedure.

  1. Can someone please help me out debugging the statement below? (run it on AdventureWorks Database)
  2. Can I have the @Title Parameter based on another select statement something like this 
Set @Title = SELECT Title FROM TableTitle

 

DECLARE @Title varchar(1000)

set @Title  = 'Design Engineer', 'Tool Designer', 'Marketing Assistant'

SELECT FirstName, LastName, e.Title
FROM HumanResources.Employee AS e
JOIN Person.Contact AS c 
ON e.ContactID = c.ContactID
WHERE e.Title IN (@Title)

 

Appreciate all the help on this.

Thank you



 


John

Viewing all articles
Browse latest Browse all 10045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>