Help me Please...this query!

_Brian_

Registered User.
Local time
Today, 16:10
Joined
Nov 26, 2004
Messages
29
this is query.
I have this groups whit relations table 1 and table 2
number in table1
1
2
3 Group A (relations with table2 create groups)
4
-----
1
2 Group B
3
----
1
2
3 Group C
4
-----
1 Group D
2
how do this query takes only groups with number 4 ??
 
Last edited:
I need this groups. Where Num=4
if the condition is Where Num=4 the result this only field where num=4 is bad, I need all group 1,2,3 and 4 Goup A and Group C, if condition is Where Num<=4 it is bad, because Group B is 1,2,3 but don't having number 4

Num:
1
2
3 Group A
4
-----
1 Group B
2
3
---
1
2 Group C
3
4
 
The way you explain it it's rather impossible to understand what is it you're trying to achieve. Post your table details with some records, how these tables are related, then (based on those records) an exact output you want your query to create. With what you've provided so far I doubt anyone will be able to help you.
 
I need groups where cod have 2004
 

Attachments

  • relation.JPG
    relation.JPG
    39 KB · Views: 467
Go to your query in design mode and put something as : like 2004* in the criteria of the cod field.
 
SELECT Tabla1.Id, Tabla1.Letra, Tabla2.ID_tabla1, Tabla2.Id_num, Tabla2.Cod
FROM Tabla1 INNER JOIN Tabla2 ON Tabla1.Id = Tabla2.ID_tabla1
WHERE Tabla2.ID_tabla1 IN (SELECT ID_tabla1 FROM Tabla2 WHERE Cod = 2004)
 

Users who are viewing this thread

Back
Top Bottom