Focal Point
[CLOSED] Same table same field - multiple joins

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1337069895

February 18, 2011, 07:21 PM
Enigma006
[CLOSED] Same table same field - multiple joins
Hai all

Can someone help me with this situation? This should be easy for many of you.
 

TABLE1      TABLE2
----------------------------
FIELD1      FIELD3 
FIELD2      FIELD4

 

FIELD1 will have multiple values which will be in FIELD3 and based on each value, value in FIELD4 changes.
So, I need to join TABLE1/FIELD1 to TABLE2/FIELD3 multiple times and need to retrieve FIELD4 for each join. how can I do this?

thanks a lot..

This message has been edited. Last edited by: Kerry,


8.1.05
HTML,PDF,EXL2K, Active, All
February 19, 2011, 05:30 AM
OPALTOSH
You can hoin to he same table multiple time as long as you give each join a unique name such as J1 J2 J3 J4 etc.

The fields can then be qualified by prefixing them with the join name.

J1FIELD4 J2FIELD4 J4FIELD4

However I think you should explain what you wnat to do a bit more clearly. It may be simply that you have a one to many join in which case you just need to use

JOIN FIELD1 IN TABLE1 TO ALL FIELD3 IN TABLE2
February 19, 2011, 07:38 AM
FrankDutch
Maybe adding some more real examples on this would help a bit.

So put some example records for both tables




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

February 19, 2011, 11:48 AM
George Patton
It reads to me that FIELD1 occurs multiple times for every occurrence of FIELD3 and you want FIELD4 to change based on the value of FIELD1 .... which is confusing because it looks like FIELD4 occurs only once for each value of FIELD3 ....


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP