User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MS SQL section within the Web Development category of DaniWeb, a massive community of 391,766 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,185 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS SQL advertiser:
Views: 546 | Replies: 2
Reply
Join Date: Nov 2007
Posts: 2
Reputation: veggen is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
veggen veggen is offline Offline
Newbie Poster

Help Need help to build a query

  #1  
Nov 15th, 2007
I'm having trouble with the following scenario:
drivers may have any of the 16 types of certificates, tasks may require any of the 16 types as well. What I need to do is build a query that will selectd all the tasks a certain driver can perform.
Example:
driver has these certificates: A,B,C,C1,C1E
so he can perform tasks that require any of these certs or any combination of certs (ie. only A, only B, both A and B, A and C1E, A,B and C1 etc).

I already have come up with a solution (which makes every possible combination), but it is very complicated and works well only with a smaller number of certificates, but with 16 (as it is the case) it requires more memory then it is available...

Any idea how to make a more efficient query?

Thanks for the time
Last edited by veggen : Nov 15th, 2007 at 12:27 pm.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2005
Posts: 4,663
Reputation: iamthwee is just really nice iamthwee is just really nice iamthwee is just really nice iamthwee is just really nice 
Rep Power: 16
Solved Threads: 297
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Industrious Poster

Re: Need help to build a query

  #2  
Nov 15th, 2007
You would have to go for a 'dynamic solution' where you are not guaranteed to hit the optimal solution.

A good example would be Dijkstra's shortest path finding algo.
Member of: F-ugly code club

Join today don't delay!
Reply With Quote  
Join Date: Nov 2007
Posts: 2
Reputation: veggen is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
veggen veggen is offline Offline
Newbie Poster

Re: Need help to build a query

  #3  
Nov 16th, 2007
Thanks, I'll look into it.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb MS SQL Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the MS SQL Forum

All times are GMT -4. The time now is 4:25 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC