ms access - SQL query to get all dependencies of needed DLLs -


The

I'm trying to manage the dependencies of your application in an Access database, and help me with the SQL query I can use a component as a component to return a list of each component. For example, suppose I have the following three tables with additional columns that are not shown here:

  CurrentBuild version dependency ============== ================================================== === Item Edition Item Version Item Version Dependency Depravion ------ ----------------------- ------------ - I / AN / A My Del 3 1.1 MyX 1.3 Mike L 1.3 N / AN / A Mayaks 1.4 My Dell 1 1.0 My Dell 4 1.0 My Dell L1 1.0 MyDll2 1.0 SomeMsDll 1.0 MyDll2 1.0 MyDll3 1.0 MyDll4 1.0 MyDll2 1.1 MyDll3 1.0 MyDll5 1.0 MyDll3 1.0 MyDll3 1.1 MyDll4 1.0 MyDll3 1.1 MyDll4 1.0 MyDll6 1.0 MyDll4 1.0 MyDll5 1.0 MyDll6 1.0 MyDll5 1.0 MyDll6 1.0 MyDll7 1.0 My Dell 6 1.0 MyDll7 1.0 MyDll8 1.0 MyDll7 1.0  

I can present builder table which query to obtain the following results have ? I like a simple query on the VBA macro; However, I do not oppose a VBA macro if it can not be done with a query.

  before version ----------- ----- - MyExe 1.3 MyDll1 1.0 MyDll2 1.0 MyDll3 1.1 MyDll4 1.0 MyDll6 1.0 MyDll7 1.0 MyDll8 1.0 Some MsDll 1.0  

So far, I have the following, but it does not give me the desired result; It just gives me back the content CurrentBuild table:

  SELECT W.Item, W.Version FROM (SELECT v. [Items], v. [Version] FROM ([version] AS IN iNNER jOIN [dependence] AS D ON V. [item] = D. [dependency] and v. [version] = D. [DepVersion]) inner join [CurrentBuild] A ss nd [item] = S. [Item] and D. [version] = S. [Version] Select UNION V. [Item], V. [Item] from [version] ASV Inner Join [current builder] V. on ASS [Item ] = S. [Item] and V. [version] = S [version]) ASW;  

If you want why MyEx does not have dependency on MyDlls, the simple answer is that there is no need to answer the question about my query; However, FYI, DLL is loaded dynamically, so MyDll has no build-time dependency on MyDll.

Thank you.

Pack the person who sucks in that Greek query and press the maximum version values ​​for each item: < / P>

  Select items as max (item), max (version) version (select item, select current builder union from item, select union from version, item, version From version dependency unions select as dependency Items, Dependencies as Dependencies from Versions) Item, Version  
by AllItem Group

Comments