I want to use more than 1000 value with IN Clause that is not supported by this clause. eg.
select prodCode from Products where prodId IN (1,2,3.....,1020);
Can someone suggest me for any alternate solution??
I want to use more than 1000 value with IN Clause that is not supported by this clause. eg.
select prodCode from Products where prodId IN (1,2,3.....,1020);
Can someone suggest me for any alternate solution??
Where did the values for prodId
that you are putting into your IN clause originate from?
If they originated from another query, then you should combine the two queries.
If they originated from some complicated process or an external data source, then you should store them in a temporary table. The temporary table can just contain a prodId
column. Join to that table instead of using an IN list.