select
A.StudentId
,B.StudentID
,B.StudentName
from College A INNER JOIN Department B
ON A.StudentId = B.StudentId
I can display StudentId from both Tables.
I have a similar situation in Webfocus. I have a cluster master file where SYN_A is joined with SYN_B on a column ACTIVITY_ID and a cluster master file is made out of these two. I want most of the data from SYN_B.SO i have the code below.
TABLE FILE CLUSTERTABLE
BY CLUSTERTABLE.SYN_B.ACTIVITY_ID
BY CLUSTERTABLE.SYN_B.SALES
END
IF i USE
BY CLUSTERTABLE.SYN_A.ACTIVITY_ID
instead of
BY CLUSTERTABLE.SYN_B.ACTIVITY_ID
i get No Data error. Why is that?Since JOIN is made on ACTIVITY_ID ,it is supposed to be the same values right?This message has been edited. Last edited by: srajeevan,
WF8206,Windows 7,8,10 HTM,PDF,EXCEL
April 05, 2018, 01:17 PM
BabakNYC
Turn on the SQL trace for your WebFOCUS report and see what SQL it's generating.
-SET &ECHO=ALL;
SET XRETRIEVAL=OFF
SET EMPTYREPORT=OFF
-*** Show SQL statements
SET TRACEON = STMTRACE//CLIENT
-*** Show SQL generated statement trace
-*SET TRACEON = STMTRACE/1/CLIENT
-*** Show SQL generated sub-statement trace
SET TRACEON = STMTRACE/2/CLIENT
-*** Disable the trace stamp (Date/Time etc)
SET TRACESTAMP = OFF
-*** Set trace line wrapping - # of characters
SET TRACEWRAP = 132
-*** Activate SQL tracing
SET TRACEUSER = ON
WebFOCUS 8206, Unix, Windows
April 05, 2018, 01:42 PM
MartinY
If you are not including any field from SYN_A the children (SYN_B) is not read (accessed) by the connector.
If you want to use field from the child (SYN_B), you must use at least one field from the parent (SYN_A).
Or since you
quote:
I want most of the data from SYN_B.
have SYN_B as the parent and SYN_A as the child
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
April 05, 2018, 02:01 PM
srajeevan
Thanks BabakNYC. Figured out the issue from the SQL Trace. When i created the cluster master file,i dragged and dropped the SYN_B to SYN_A in IWay DM,it created inner join on SIMILAR name fields. In SQL trace it showed what all fields are being joined.So it created invalid joins on drag and drop. I removed those invalid joins and now the report is working.