Focal Point
[CLOSED] Duplicate Major Field

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

March 21, 2017, 04:16 PM
Terri1977
[CLOSED] Duplicate Major Field
Hello,
I am pull information and for one of the column fields it is pulling all instances. I only one to pull the record one time with the last or current major. I am using WebFocus 8.1. Below is the code. The results are printing multi records for each major the student every took. I only want it for the last or current major.

-*ENGINE INT CACHE SET ON
SET ALL = ON

JOIN AS_STUDENT_REGISTRATION_DETAIL.AS_STUDENT_REGISTRATION_DETAIL.PIDM_KEY IN AS_STUDENT_REGISTRATION_DETAIL
TO UNIQUE SFRWDRL.SFRWDRL.SFRWDRL_PIDM IN SFRWDRL TAG J001 AS J001
END
-*-DEFAULTH &WF_SUMMARY='Summary';
-*-DEFAULTH &WF_TITLE='WebFOCUS Report';

DEFINE FILE AS_STUDENT_REGISTRATION_DETAIL
WITHDRAW_DT/YYMD = HDATE(SFRWDRL_EFF_WDRL_DATE, 'YYMD');
BIRTH_DT/YYMD = HDATE(BIRTH_DATE, 'YYMD');
BEGIN_DATE/YYMD = '&BEGDATE. Today's Date: Format YYYYDDMM.';
AGE_IN_DAYS/I5 = BEGIN_DATE - BIRTH_DT;
AGE/I2 = AGE_IN_DAYS/365.25;
END

TABLE FILE AS_STUDENT_REGISTRATION_DETAIL
PRINT SFRWDRL_TERM_CODE AS 'Term'
BY SFRWDRL_TERM_CODE NOPRINT
BY ID AS 'Banner'
BY LAST_NAME AS 'Last Name'
BY FIRST_NAME AS 'First Name'
BY MIDDLE_INITIAL AS 'MI'
BY MAJR_DESC1 AS 'Major'
BY AGE AS 'Age'
BY SFRWDRL_ESTS_CODE AS 'Code'
BY WITHDRAW_DT AS 'Withdrawal Date'
WHERE RECORDLIMIT EQ 500
-*AND TERM_CODE_KEY EQ '&TERM. Term.'
WHERE SFRWDRL_TERM_CODE EQ '&SFRWDRL_TERM_CODE.(FIND AS_STUDENT_REGISTRATION_DETAIL.TERM_CODE_KEY IN AS_STUDENT_REGISTRATION_DETAIL |FORMAT=A6V).Term of Withdrawal .';
ON TABLE PCHOLD FORMAT EXL2K FORMULA
ON TABLE NOTOTAL
ON TABLE SET CACHELINES 100
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET SQUEEZE ON
ON TABLE SET HTMLCSS ON
ON TABLE SET HTMLENCODE ON
ON TABLE SET EMPTYREPORT ON
ON TABLE SET GRWIDTH 1
ON TABLE SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
-*TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, SUMMARY=&WF_SUMMARY.QUOTEDSTRING, ORIENTATION=LANDSCAPE, HFREEZE=OFF, $
ENDSTYLE
END

-RUN
-EXIT

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8
Windows, All Outputs
March 27, 2017, 12:37 PM
FP Mod Chuck
Terri

Since no one has replied I suggest you open a case and get some guidance from Tech support.

Regards


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
March 27, 2017, 02:15 PM
TexasStingray
you need to sort it by the high 1 date where the date is the major date and then by major something like below
BY HIGHEST 1 MAJOR_DATE
BY MAJOR





Scott

You might also take a look at the as_student_enrollment_summary view. It would probably be a better way to get at the major for a term.

In addition to TexasStingray's suggestion, you might want to add something to avoid future terms:

WHERE term_code_key LE '¤t_term'


- Rob


WebFocus 8201m on Windows; App Studio 8201; Procedures: WebFocus with SQL; HTML Parameter Pages & Dashboard; Output: Excel, HTML, & PDF.