SQL Question. Using the script below 1) display record where "IDT_NUM" is unique (no duplicate). 2) only display the fol
Posted: Tue Jul 12, 2022 8:06 am
SQL Question.
Using the script below
1) display record where "IDT_NUM" is unique (noduplicate).
2) only display the following, Status A = Active, andAS = Active Strong
3) put a pipe (|) delimeter wrapper around thisscript so the data come out as shown below.
John | Doe | Good Insurrance LLC | 06-10-2025|...etc
Sasha | Roberst | Best Deal LLC | 05-10-2023|....etc
SELECTTRIM (C.MAIL_ADDR_1) ||', II TRIM (C.MAIL_ADDR_CITY) || , || TRIM(C.MAIL_ADDR_ST) I, II TRIM (C.MAIL_ADDR_ZIP) as "BillingAddress",A.PIGT_NUM as "PIGT Number",INS_CRRY_NAME as "Insurance Carrier Name",INS_EXPIRY DATE as "Insurance Expiration Date",INS_PLCY_NUM as "Insurance Policy Number",B.LANG_CODE as "Languages",LCNS_NUM as "License Number",LCNS_TYPE_CODE as "License Type",VNDR_NAME as "Vendor Name",CNTC_NAME as "Primary Contact",BUSN_PHN_NUM as "Business Phone Number",EMAIL as "Business Email",
STATUS as "Status",IDT_NUM as "Identifier Number",
from PGM_INFO_MSTR Ainner join PGM_LOC_LANGS B on A.PIGT_NUM = B.PIGT_NUM;
Using the script below
1) display record where "IDT_NUM" is unique (noduplicate).
2) only display the following, Status A = Active, andAS = Active Strong
3) put a pipe (|) delimeter wrapper around thisscript so the data come out as shown below.
John | Doe | Good Insurrance LLC | 06-10-2025|...etc
Sasha | Roberst | Best Deal LLC | 05-10-2023|....etc
SELECTTRIM (C.MAIL_ADDR_1) ||', II TRIM (C.MAIL_ADDR_CITY) || , || TRIM(C.MAIL_ADDR_ST) I, II TRIM (C.MAIL_ADDR_ZIP) as "BillingAddress",A.PIGT_NUM as "PIGT Number",INS_CRRY_NAME as "Insurance Carrier Name",INS_EXPIRY DATE as "Insurance Expiration Date",INS_PLCY_NUM as "Insurance Policy Number",B.LANG_CODE as "Languages",LCNS_NUM as "License Number",LCNS_TYPE_CODE as "License Type",VNDR_NAME as "Vendor Name",CNTC_NAME as "Primary Contact",BUSN_PHN_NUM as "Business Phone Number",EMAIL as "Business Email",
STATUS as "Status",IDT_NUM as "Identifier Number",
from PGM_INFO_MSTR Ainner join PGM_LOC_LANGS B on A.PIGT_NUM = B.PIGT_NUM;