Using IN with SET Clause

Have a great idea for extending Zimbra? Share ideas, ask questions, contribute, and get feedback.
Post Reply
kokilasoral
Posts: 1
Joined: Thu Jun 02, 2016 5:53 am

Using IN with SET Clause

Post by kokilasoral »

For Declare or Set clauses to rationalize a query. One of the areas comprises multiple departments. Occasionally, I need to border to one depart id and other periods I would like numerous departments. Is it probable to Set the @depts to comprise multiple department IDs?
declare @end_date datetime, @start_date datetime, @dx_startdate datetime, @dx_enddate datetime,@age_anchor datetime,@active_start datetime, @active_end datetime, @dept numeric (18,0)

SET @end_date='2016-05-31'
SET @start_date = '2015-06-01'
SET @dx_startdate = '2015-06-01'
SET @dx_enddate = '2016-05-31'
SET @age_anchor = '2016-05-31'
SET @active_start = '2014-06-01'
SET @active_end = '2016-05-31'
***SET @depts = in "dept1', 'dept2' ???(What do I put here?)***
Post Reply