Saturday, December 28, 2013

Query that provides combination of data that meet a certain criteria


The problem is multiple combinations can be formed from available pieces. The list is a database in Microsoft Access and I am trying to write a SQL query to solve my purpose. I hope I am able to describe the problem.



To get help with this type of problem, it is always a good idea to post:


1) CREATE TABLE statements for your tables.

2) INSERT statements with sample data.

3) The desired result given the sample.

4) Which version of your software product you are using.


Before you go ahead, beware that this is a forum for T-SQL and here you will get a solution that runs on SQL Server. But there are considerable differences between the SQL dialects and SQL Server and Access, so I recommend that you ask in a forum devoted to Access.





Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

No comments:

Post a Comment