﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 7,2000 / T-SQL  / Using the IN operator with two variable / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Wed, 22 May 2013 10:47:54 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Using the IN operator with two variable</title><link>http://www.sqlservercentral.com/Forums/Topic1398031-8-1.aspx</link><description>[quote][b]mozturk 92000 (12/20/2012)[/b][hr]T-SQL : Select * from Gecoserv where typeOfEcosystem IN (:typeNameList) AND service IN (:serviceNameList)[/quote]That is the same thing you posted originally. It seems you want some help with the code. I am willing to help but you have to provide me with something to work with. ddl, sample data and desired output. As I said before you find details about best practices for posting questions by clicking the first link in my signature. I am certain that if you post the necessary information you will have an answer very quickly.</description><pubDate>Fri, 21 Dec 2012 07:45:42 GMT</pubDate><dc:creator>Sean Lange</dc:creator></item><item><title>RE: Using the IN operator with two variable</title><link>http://www.sqlservercentral.com/Forums/Topic1398031-8-1.aspx</link><description>T-SQL : Select * from Gecoserv where typeOfEcosystem IN (:typeNameList) AND service IN (:serviceNameList)</description><pubDate>Thu, 20 Dec 2012 08:42:23 GMT</pubDate><dc:creator>mozturk 92000</dc:creator></item><item><title>RE: Using the IN operator with two variable</title><link>http://www.sqlservercentral.com/Forums/Topic1398031-8-1.aspx</link><description>[quote][b]mozturk 92000 (12/18/2012)[/b][hr] (It's HQL which is similar to T-SQL)How can I fix my problem ?[/quote]Write it as a stored procedure in T-SQL instead of relying on HQL. ;-)</description><pubDate>Tue, 18 Dec 2012 23:10:11 GMT</pubDate><dc:creator>Jeff Moden</dc:creator></item><item><title>RE: Using the IN operator with two variable</title><link>http://www.sqlservercentral.com/Forums/Topic1398031-8-1.aspx</link><description>Hi and welcome to SSC. It is pretty difficult to provide a detailed answer for your question without speculating quite a few things. You might want to take a quick look at the first link in my signature for best practices when posting questions.</description><pubDate>Tue, 18 Dec 2012 13:57:04 GMT</pubDate><dc:creator>Sean Lange</dc:creator></item><item><title>Using the IN operator with two variable</title><link>http://www.sqlservercentral.com/Forums/Topic1398031-8-1.aspx</link><description>I would like to explain my problem with a simple example.Here is a part of my database:Type                     Service-----                     -----Freshwater            HabitatSaltwater              FoodDunes                   RecreationThat's the query I have: (It's HQL which is similar to T-SQL)from Gecoserv _a where _a.typeOfEcosystem IN (:typeNameList) AND _a.service IN (:serviceNameList)I want the grid to show only the single combinations (Freshwater-Habitat, Saltwater-Food and Dunes-Recreation etc.) but it shows also other combinations (ex: Freshwater-Recreation).How can I fix my problem ?</description><pubDate>Tue, 18 Dec 2012 13:51:11 GMT</pubDate><dc:creator>mozturk 92000</dc:creator></item></channel></rss>