Database & SQL

Moderators: None (Apply to moderate this forum)
Number of threads: 1174
Number of posts: 2221

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
"ANY (a, b) IN (expr)" Posted by netgert on 17 Jun 2009 at 9:52 AM
Hello

I recently dug up some old projects and noticed that in many of those I had queries that had "a IN (expr1) OR b IN (expr1)" as a condition. Some of the time, the expression was a list of values passed via parameters, some of the time it was a SELECT expression. Most of the time the expression had potential to become computationally expensive. In few places, there were also variants where there were more than 2 columns being matched against a list of candidates (eg: a IN (...) OR b IN (...) OR c IN (...))

Somewhere between those projects and today I have given up the practice of manual query building and have turned to ORM solutions instead. However, seeking to continue improving my knowledge and skills in the field, I keep on searching for optimal solutions for both past and present problems.

Discuss which languages have which ways of representing the aforementioned problem



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.