SELECT help

2003-07-18 Thread Gyurasits Zoltan
HI all!


I want make the SELECT  for this situation.

Example:

Twarehouse
--
IDname
---
01Spring_WH
02Screw_WH
03Toll_WH


Tparts
--
IDname
---
01M3 screw
02M4 screw
03Hammer



Tmovement
--
part_ID incoming_IDoutgoing_ID quantity
---- - 
01010210
0201031
0302015



I want build list about movement, with warehouse's names

SELECT
twarehouse.name,  ??# incoming warehouse name
twarehouse.name,  ??# outgoing warehouse name

tparts.name,
tmovement.quantity
FROM
tparts, twarehouse
INNER JOIN  tmovement
ON
tmovement.part_ID=tparts.ID 

AND 
tmovement.incoming_ID=twarehouse.ID   
AND
tmovement.outgoing_ID=twarehouse.ID   


Please help me, who can . How can I do??
I don't want make temorary table, if is possible


Thank You!




Re: SELECT help

2003-07-18 Thread Gyurasits Zoltan
Hi

This is working...

Thank You


Zoltan

- Original Message -
From: Cabanillas Dulanto, Ulises [EMAIL PROTECTED]
To: MYSQL Lista [EMAIL PROTECTED]
Sent: Friday, July 18, 2003 10:54 PM
Subject: RE: SELECT help


 Try with :

 SELECT tparts.name,
a.name,
b.name,
 tmovement.quantity
 FROMtmovement inner join tparts on (tmovement.part_id = tparts.Id)
  inner join twarehouse a on (
 tmovement.incoming_id =  a.Id )
  inner join twarehouse b on (
 tmovement.outgoing_id =  b.Id )


 Ulises

 -Mensaje original-
 De: Gyurasits Zoltan [mailto:[EMAIL PROTECTED]
 Enviado el: Martes 18 de Febrero de 2003 04:11 PM
 Para: MYSQL Lista
 Asunto: SELECT help


 HI all!


 I want make the SELECT  for this situation.

 Example:

 Twarehouse
 --
 IDname
 ---
 01Spring_WH
 02Screw_WH
 03Toll_WH


 Tparts
 --
 IDname
 ---
 01M3 screw
 02M4 screw
 03Hammer



 Tmovement
 --
--
 --
 part_ID incoming_IDoutgoing_ID quantity
 ---- -
 
 01010210
 0201031
 0302015



 I want build list about movement, with warehouse's names

 SELECT
 twarehouse.name,  ??# incoming
warehouse
 name
 twarehouse.name,  ??# outgoing
warehouse
 name

 tparts.name,
 tmovement.quantity
 FROM
 tparts, twarehouse
 INNER JOIN  tmovement
 ON
 tmovement.part_ID=tparts.ID
 --
--
 AND
 tmovement.incoming_ID=twarehouse.ID   
 AND
 tmovement.outgoing_ID=twarehouse.ID   


 Please help me, who can . How can I do??
 I don't want make temorary table, if is possible


 Thank You!






-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]