1 |
SELECT A.bill_class as Pol_code, b.bill_name as Pol_name, a.bill_no as Card_no, ' Web site ' as Buy_path, A.rev_clerk_code as Agent_code, A.rev_clerk_type as Agent_type, To_char (a.regist_date, ' yyyy-mm-dd ') as Recip_date, To_char (a.chk_date, ' Y Yyy-mm-dd ') as Pay_date, To_char (a.invalid_date, ' yyyy-mm-dd ') as invalid_date, case when chk_stat = ' 0 ' THEN ' not write-off ' when Chk_stat = ' 1 ' and autochkflag = ' 1 ' THEN ' has been automatically written off ' when chk_stat = ' 1 ' and Autochkflag = ' 0 ' THEN ' has been manually written off ' when chk_stat = ' 2 ' THEN ' lost ' when chk_stat = ' 3 ' THEN ' void ' when chk_stat = ' 4 ' THEN ' back to pay the write-off ' when chk_stat = ' 5 ' THEN ' destroyed ' when chk_stat = ' A ' THEN ' to be cancelled ' end as Recip_stat, Rev_branch_no, B.bill_literal_price as Prem from Shcvms.bill_grant_check A, shcvms.b Ill_class b WHERE A.regist_date is isn't NULL and A.bill_class = B.bill_class and A.bill_class in (' 1001 ', ' 1093 ', ' 1096 ', ' 1097 ', ' 1098 ', ' 1099 ', ' 1100 ', ' 1302 ', ' 1303 ', ' 1305 ', ' 1306 ', ' 1910 ', ' 1911 ', ' 1912 ', ' 1913 ', ' 1914 ', ' 1915 ', ' 1916 ', ' 1 ' 917 ', ' 1918 ', ' 1919 ', '1922 ', ' 1923 ', ' 1924 ', ' 1925 ', ' 1926 ', ' 1927 ', ' 1928 ', ' 1929 ', ' 1930 ', ' 1931 ', ' 1935 ', ' 1936 ', ' 1937 ', ' 1938 ', ' 1939 ', ' 19 ' 40 ', ' 1941 ', ' 1942 ', ' 1943 ', ' 1944 ', ' 1945 ', ' 5232 ', ' 5233 ', ' 5234 ', ' 5252 ', ' 5255 ', ' 5258 ', ' 5265 ', ' 5260 ', ' 5276 ', ' 5277 ' ', ' 5278 ', ' 5285 ', ' 5290 ', ' 5301 ', ' 5304 ', ' 5309 ', ' 5311 ', ' 5329 ', ' 5330 ', ' 5359 ', ' 5376 ', ' 5507 ', ' 5512 ', ' 5514 ', ' 5516 ' , ' 5122 ', ' 5126 ', ' 5130 ', ' 5132 ', ' 5141 ', ' 5142 ', ' 5156 ', ' 5157 ', ' 5161 ', ' 5162 ', ' 5163 ', ' 5164, ' 5165 ', ' 5166 ', ' 5167 ', ' 5168 ', ' 5558 ', ' 5564 ', ' 5507 ' |