SELECT AC.PIN_NUM ,1 FROM PS_GP_ACCUMULATOR AC WHERE AC.PIN_USER_KEY1_NUM = ( SELECT PIN1.PIN_NUM FROM PS_GP_PIN PIN1 WHERE PIN1.PIN_CODE = 'TAX VR RPT TYPE USA') UNION SELECT AC.PIN_NUM ,2 FROM PS_GP_ACCUMULATOR AC WHERE AC.PIN_USER_KEY2_NUM = ( SELECT PIN1.PIN_NUM FROM PS_GP_PIN PIN1 WHERE PIN1.PIN_CODE = 'TAX VR RPT TYPE USA') UNION SELECT AC.PIN_NUM ,3 FROM PS_GP_ACCUMULATOR AC WHERE AC.PIN_USER_KEY3_NUM = ( SELECT PIN1.PIN_NUM FROM PS_GP_PIN PIN1 WHERE PIN1.PIN_CODE = 'TAX VR RPT TYPE USA') UNION SELECT AC.PIN_NUM ,4 FROM PS_GP_ACCUMULATOR AC WHERE AC.PIN_USER_KEY4_NUM = ( SELECT PIN1.PIN_NUM FROM PS_GP_PIN PIN1 WHERE PIN1.PIN_CODE = 'TAX VR RPT TYPE USA') UNION SELECT AC.PIN_NUM ,5 FROM PS_GP_ACCUMULATOR AC WHERE AC.PIN_USER_KEY5_NUM = ( SELECT PIN1.PIN_NUM FROM PS_GP_PIN PIN1 WHERE PIN1.PIN_CODE = 'TAX VR RPT TYPE USA') UNION SELECT AC.PIN_NUM ,6 FROM PS_GP_ACCUMULATOR AC WHERE AC.PIN_USER_KEY6_NUM = ( SELECT PIN1.PIN_NUM FROM PS_GP_PIN PIN1 WHERE PIN1.PIN_CODE = 'TAX VR RPT TYPE USA')
|