TAX_LOCVW_US

(SQL View)
Index Back

Active Tax Location Codes - US

Selects active tax location codes from the Tax Location table.

SELECT DISTINCT C.COMPANY , A.TAX_LOCATION_CD , A.DESCR FROM PS_TAX_LOCATION1 A , PS_TAX_LOCATION2 B , PS_CO_STATETAX_TBL C WHERE A.EFF_STATUS='A' AND A.TAX_LOCATION_CD=B.TAX_LOCATION_CD AND B.STATE=C.STATE AND C.EFFDT=( SELECT MAX(D.EFFDT) FROM PS_CO_STATETAX_TBL D WHERE C.COMPANY=D.COMPANY AND C.STATE=D.STATE) AND C.EFF_STATUS = 'A' AND (B.LOCALITY=' ' OR EXISTS ( SELECT 'X' FROM PS_CO_LOCALTAX_TBL L WHERE B.LOCALITY <> ' ' AND C.COMPANY=L.COMPANY AND B.STATE=L.STATE AND B.LOCALITY=L.LOCALITY AND L.EFFDT=( SELECT MAX(M.EFFDT) FROM PS_CO_LOCALTAX_TBL M WHERE L.COMPANY=M.COMPANY AND L.STATE=M.STATE AND L.LOCALITY=M.LOCALITY ) ) ) AND (B.LOCALITY_LINK=' ' OR EXISTS ( SELECT 'X' FROM PS_CO_LOCALTAX_TBL L WHERE B.LOCALITY_LINK <> ' ' AND C.COMPANY=L.COMPANY AND B.STATE=L.STATE AND B.LOCALITY_LINK=L.LOCALITY AND L.EFFDT=( SELECT MAX(N.EFFDT) FROM PS_CO_LOCALTAX_TBL N WHERE L.COMPANY=N.COMPANY AND L.STATE=N.STATE AND L.LOCALITY=N.LOCALITY ) ) )

  • Related Language Record: TAXLO_US_LNG_VW
  • # PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
    1 COMPANY Character(3) VARCHAR2(3) NOT NULL Company
    2 TAX_LOCATION_CD Character(10) VARCHAR2(10) NOT NULL Tax Location Code
    3 DESCR Character(30) VARCHAR2(30) NOT NULL Description