Guest_imported
New member
- Jan 1, 1970
- 0
I have two tables: 1) request, 2) n2t
the important fields in the request table are rID and rStatus
the important fields in the n2t table are n2tNoteID and n2tTicketID.
what i need to do is be able to select all rIDs where rStatus is > O, and exclude any rID's that match n2tTicketID where n2tNoteID equals a specific number
In other words if the following data is available:
(rID = n2tTicketID)
Requests N2T
rID rStatus n2tTicketID n2tNoteID
1 1 1 3
2 0 1 5
3 3 2 3
4 2 3 2
5 0 4 1
and i want all the rID's where the rStatus is > 0 excluding any that are linked to n2TicketID #5 the result should be
--rID = 3, rID = 4
I don't know how to make this select statement, I've tried different things like JOIN, sub-selects, but nothing has worked. Thank You in advance.
the important fields in the request table are rID and rStatus
the important fields in the n2t table are n2tNoteID and n2tTicketID.
what i need to do is be able to select all rIDs where rStatus is > O, and exclude any rID's that match n2tTicketID where n2tNoteID equals a specific number
In other words if the following data is available:
(rID = n2tTicketID)
Requests N2T
rID rStatus n2tTicketID n2tNoteID
1 1 1 3
2 0 1 5
3 3 2 3
4 2 3 2
5 0 4 1
and i want all the rID's where the rStatus is > 0 excluding any that are linked to n2TicketID #5 the result should be
--rID = 3, rID = 4
I don't know how to make this select statement, I've tried different things like JOIN, sub-selects, but nothing has worked. Thank You in advance.