Problems writing a linked query in SQL



Hello Newsgroup,

I am doing some archive database and therefore got one table indexing
every folder and one table storing which rack belongs to which
department, eg:


table folders :
+-----------+------+-------+
| folder_id | rack | date |
+===========+======+=======+
| 123456789 | 325 | 05/02 |
+-----------+------+-------+
| 987654321 | 158 | 02/07 |
+-----------+------+-------+
| 987485221 | 666 | 01/05 |
+-----------+------+-------+


table racks:
+----+------+------------+
| id | rack | department |
+====+======+============+
| 1 | 158 | FKA/PKG |
+----+------+------------+
| 2 | 555 | KOV/GDA |
+----+------+------------+
| 3 | 666 | FKA/PKG |
+----+------+------------+
| 4 | 123 | ORG/RET |
+----+------+------------+


Now I have to select all the folders which have for example an equal
date belonging to a certain department, meaning:
- I have to find the racks belonging to eg "FKA/PGK" (158, 666)
- Then I'll got to find every folder belonging to the racks 666 and
158 (987485221, 987654321)
- Then I've got to find those which belong to a certain condition
(eg.
date <02/2001)
Sure I could do that in three queries, but somehow I've got the
feeling that SQL is powerfull enough to do this in one query.
But how?


thanks in advance
Thorben Grosser

.



Relevant Pages

  • Re: Limit access with referrer/htaccess?
    ... Users belonging to group A shall get access to folder A, but not B, C ... .htaccess file this isn't possible. ... RewriteEngine on ...
    (comp.lang.php)
  • Re: Renaming a file that "belongs" to a folder
    ... > graphics files associated with the page that had been saved in a second ... > folder within the first. ... > If i deleted the folder containing the graphics, the HTML file also got ... > The only way to 'break' this "belonging to" was to rename the HTML file ...
    (microsoft.public.windowsxp.customize)
  • Re: Renaming a file that "belongs" to a folder
    ... > graphics files associated with the page that had been saved in a second ... > folder within the first. ... > If i deleted the folder containing the graphics, the HTML file also got ... > The only way to 'break' this "belonging to" was to rename the HTML file ...
    (microsoft.public.windowsxp.basics)
  • Help please : Set permision to share folder
    ... I need to share a folder located on a file server. ... Only people belonging to group PRACTICE will be able to store files in that ... Some users of PRACTICE groups are also belonging to Users group ...
    (microsoft.public.windowsxp.network_web)
  • Re: Problems writing a linked query in SQL
    ... from folders as f ... inner join racks as r on f.rack = r.rack ... Thorben Grosser wrote: ... date belonging to a certain department, ...
    (comp.databases.ms-access)