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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
[solved]join help
 Login/Join
 
Gold member
posted
Hi all,
I have two tables with the following structure
TABLE1 NAME==> EMPLYOEE_score
EMP_ID--Period_id-score
1------------1----------2
1------------3----------1
2------------1----------3
2------------2----------2
2------------3----------0
3 3 3

TABLE2 NAME==> Periods

Period_id
1
2
3

All I want is, I need to join these two tables such a way that my resultset should look like this(need to show all the Period_id for each emp_id and add the values of scores for each emp_id )

EMP_ID Period_id score
1 ----------1----------2
1 ---------- 2----------2
1 ---------- 3----------3
2 ---------- 1----------3
2 ---------- 2----------5
2 ----------3----------5
3 ---------- 1----------0
3 ---------- 2----------0
3 ---------- 3----------3

I was trying with outer joins but didnt get the expected result.

Thanks
krish.

WebFOCUS 7.6.5 UNIX EXCEL

This message has been edited. Last edited by: krish,
 
Posts: 64 | Location: North Carolina | Registered: December 04, 2007Report This Post
Silver Member
posted Hide Post
Are you joing single or multiple?


WebFocus 7.6.4
SQL
HTML and Excel
 
Posts: 49 | Registered: June 06, 2008Report This Post
Gold member
posted Hide Post
Hi Kfr104

I Tried with SQL and focus multiple joins but no luck... Frowner Confused


7.1.1
Windows XP
HTML
 
Posts: 64 | Location: North Carolina | Registered: December 04, 2007Report This Post
Expert
posted Hide Post
Try left outer join and the LAST function to calculate the score in a compute:

NEW_SCORE/I4=IF EMP_ID NE LAST EMP_ID THEN SCORE ELSE LAST NEW_SCORE+SCORE;


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Gold member
posted Hide Post
HI GINNY,
thanks for your reply... i got your soution for accumulating the score value.

left outer join won't work for this case because in the periods table i dont have all the emp_id's of employee_score.

what is expectation is for every emplyee_id i need all the period_id (with the score eq 0 for missing record)

Thanks
krish


7.1.1
Windows XP
HTML
 
Posts: 64 | Location: North Carolina | Registered: December 04, 2007Report This Post
Virtuoso
posted Hide Post
Krish,
You may want to look up the MATCH command. I'm confidant that you will accomplish what you need if you use the MATCH command to collect the data into one intermediate hold file. Once that is done, use Ginny's method of calculating the scores.

Hope this helps ...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders