Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Regarding Joining two files

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Regarding Joining two files
 Login/Join
 
Silver Member
posted
In file 1 i have-
Rollno name day
------- ---- -----
111 aaa mon
111 aaa tue

FIle 2 contains-

Rollno comments
----- --------
111 present
111 absent

Both are flat files
So i hold it in format focus and then join

'join Rollno in file1 to all Rollno in file2'

but it is giving-
Rollno name day comments
------- ---- ---- --------
111 aaa mon present
111 aaa mon absent
111 aaa tue present
111 aaa tue absent

And if i dont use 'all' the it gives-
Rollno name day comments
------- ---- ---- --------
111 aaa mon present
111 aaa tue present

but i want it as-
Rollno name day comments
------- ---- ---- --------
111 aaa mon present
111 aaa tue absent

How do i make sure that the 1st record in file 1 joins to the corresponding 1st record in file 2,
and the 2nd record of file1 joins with the corresponding 2nd record with file 2 ?
Any suggestions?


FOCUS 7.1.1/ MF(OS/390)
 
Posts: 40 | Location: Chennai, India | Registered: January 31, 2007Report This Post
Member
posted Hide Post
Manash,
First I am assuming that your files are sorted the way you need them i.e. each row having a corresponding row in the same position within the other table.
Before you hold in format focus and join the two files, you should create a define field for each file that is a unique row identifier (ROWNUM/I9 = ROWNUM + 1)
Then join on this new field.
That way you get a one to one join for each row.
Hope this is what you wanted to do....


WebFOCUS 760 HPUX - Using MRE, Report Caster, Dashboard and Self Service.
 
Posts: 16 | Location: California | Registered: April 18, 2007Report This Post
Expert
posted Hide Post
hmm. it seems you don't actually have a 'corresponding record', based on the key 'ROLLNO'
so you have to create a record number for each file and join on that record number.
Does that sound like what you want to do?




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
<Tim Howard_ABCBS>
posted
You may try adding (defining) a line count field to each file:

File1-
Line# Rollno name day
----- ------ ---- ----
1 111 aaa mon
2 111 aaa tue

File2-
Line# Rollno comments
----- ------ --------
1 111 present
2 111 absent


Then join off of the line field:
join Line# in file1 to Line# in file2


This will only work if you have the same number of rows and each row number corresponds in both tables. Haven't tested, just a thought.
 
Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Regarding Joining two files

Copyright © 1996-2020 Information Builders