Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Select records using dynamic condition

$
0
0

Hi,

I have query with dynamic conditions by passing the values  into a variable and using them in the query

SELECT * FROM dbo.table WHERE ID > ? and ID <= ?

This condition is not pulling all the records, if I have 1,2,3,4,5 records in my source which I'm running using ETL, the above condition is missing some values.

using ">" and "<=", are good or should I use between?

Please let me know.


Viewing all articles
Browse latest Browse all 24688

Trending Articles



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