T-SQL Stored procedure, "In" predicate in a "Where" clause

2009-10-21 Thread Scott Stewart

Hey all, 

 

Quick question, in T-SQL (MS SQL Server) can you put an "in" predicate in a
"Where" clause inside a stored procedure?

 

ie:

 

SELECT x

FROM table

WHERE y IN (a,b,c)

 

 

 

--

Scott Stewart

IT Consultant/ColdFusion Developer

4405 Oakshyre Way

Raleigh, NC 27616

(919) 874-6229

 



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327437
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: T-SQL Stored procedure, "In" predicate in a "Where" clause

2009-10-21 Thread Eric Cobb

Yep.

Anything you can run in a query, you can run in a Proc (plus more!).

Thanks,

Eric Cobb
http://www.cfgears.com


Scott Stewart wrote:
> Hey all, 
> 
>  
> 
> Quick question, in T-SQL (MS SQL Server) can you put an "in" predicate in a
> "Where" clause inside a stored procedure?
> 
>  
> 
> ie:
> 
>  
> 
> SELECT x
> 
> FROM table
> 
> WHERE y IN (a,b,c)
> 
>  
> 
>  
> 
>  
> 
> --
> 
> Scott Stewart
> 
> IT Consultant/ColdFusion Developer
> 
> 4405 Oakshyre Way
> 
> Raleigh, NC 27616
> 
> (919) 874-6229
> 
>  
> 
> 
> 
> 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327441
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4