Focal Point
[CLOSED] field not found after joins

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

August 21, 2008, 08:00 PM
Selena B
[CLOSED] field not found after joins
Is there a limit to the number of fields a file can contain after a join? I'm joining table 1 to table 2, then joining table 2 to table 3. I see field 1 after the first join but it is not in the table after the second join.

This message has been edited. Last edited by: Selena B,


7.1.7
Vista
August 21, 2008, 08:13 PM
susannah
Selena,
when you join, its A to B
and then A to C, where A is now the entity formed after the first join (A=A+B);
do a
? JOIN
after your first join
and a
CHECK FILE filenameA PICTURE
which will give you an interesting view.
then table file your first join to see what you get.
if you're happy, go on to the add the second join, and repeat the ? JOIN and the CHECK.
You can use DevStu to do the joins, it will take all the worry out, and give you a picture.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
August 21, 2008, 08:32 PM
Selena B
Susannah thank you so much for your input. You're right and that's how I meant to reference it - table 1 to table 2 then table 1 to table 3. That is in fact an interesting view. I didn't know you could do that. I'm not sure I'm understanding all of the information it's listing though. One thing I did notice is that it's saying the total # of fields after the first join is 100 when it should be 102. After the second join it lists 145 for the total # of fields when there should be 160. It also list out 4 fields under each table that I'm joining together. (I'm not sure why it lists 4. I'm only joining on 2 fields). I hope this makes sense.


7.1.7
Vista
August 21, 2008, 11:54 PM
susannah
you're making progress nicely...
the PICTURE option on the CHECK command just lists 4 fields, that's the nature of the thing. just to show you whats hooked up to what.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
August 22, 2008, 05:10 AM
nubi
If you do a hold on your join and then refenece that table with ?F you can see what is missing:

ie:
quote:

JOIN ID_1 IN TABLE_1 TO ID_2 IN TABLE_2 AS J1


TABLE FILE TABLE_1
PRINT *
ON TABLE HOLD AS H1 FORMAT XFOCUS
END

?F H1


this will give you a list of all fields in your new structure and you can look and see what is missing...


Developer Studio 7.64
Win XP
Output: mostly HTML, also Excel and PDF

"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
August 22, 2008, 06:52 AM
Danny-SRL
Nubi,

That won't work if you have a hierarchy because PRINT * takes only the left-most path.

However after a JOIN you can use ?FF on the structure and get all the fields:
  
-* File QFF.fex
?FF GGSALES
?FF GGPRODS
JOIN PCD IN GGSALES TO PCD IN GGPRODS AS P
?FF GGSALES



Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

August 22, 2008, 07:05 AM
nubi
really? i didn't know that, i had used the ?ff statement but din't think she would need the field types- so sorry about that should have checked before i posted... Eeker :d


Developer Studio 7.64
Win XP
Output: mostly HTML, also Excel and PDF

"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
August 22, 2008, 08:31 AM
PBrightwell
Selena,

Did you put "AS J1" and "AS J2" on your joins?
If you don't use an AS name you only have the last join.


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
August 22, 2008, 09:17 AM
Selena B
Thank you all for your input. PBrightwell - yes I am using 'AS' along with tags. One of the dbas nicely volunteered to write a sql passthrough with all of the joins. I will continue to play around in the WF code using the suggestions posted here. Again, thank you all so much!


7.1.7
Vista