Hi,
Can someone help me with attacking my latest requirement for an SP query.
I've been tasked with searching a table where the datetime field could be in a list of over 500 datetimes!
I was thinking of using the 'IN' clause but that doesn't appear to be compatible with DATETIME as the in parameter would need to be NTEXT and SQL is moaning.
I've also found threads that using 'IN' with a large list has limitations and speed issues.
So how do i do it?
How do I write a T-SQL query when i want to get all records that match a huge list of potential dates?
Note: this is not a date range, but a list of specific dates!
Thanks,
1DMF
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
MIME::Lite TLS Email Encryption - Perl v0.02 beta
Can someone help me with attacking my latest requirement for an SP query.
I've been tasked with searching a table where the datetime field could be in a list of over 500 datetimes!
I was thinking of using the 'IN' clause but that doesn't appear to be compatible with DATETIME as the in parameter would need to be NTEXT and SQL is moaning.
I've also found threads that using 'IN' with a large list has limitations and speed issues.
So how do i do it?
How do I write a T-SQL query when i want to get all records that match a huge list of potential dates?
Note: this is not a date range, but a list of specific dates!
Thanks,
1DMF
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
MIME::Lite TLS Email Encryption - Perl v0.02 beta