From: newton-cn Date: Sat, 24 May 2025 04:10:47 +0000 (+0900) Subject: jj X-Git-Url: https://git.insang.kr/gitweb/?a=commitdiff_plain;h=337bd73d91eab87b92d184be7f04b5b15b6c30cd;p=newton-cn_pos.git jj --- diff --git "a/\355\217\254\354\235\270\355\212\270\354\240\201\353\246\275\352\260\234\353\260\234_db\354\277\274\353\246\254 \353\260\217 \353\260\251\355\226\245\354\204\261 - \353\263\265\354\202\254\353\263\270.txt" "b/\355\217\254\354\235\270\355\212\270\354\240\201\353\246\275\352\260\234\353\260\234_db\354\277\274\353\246\254 \353\260\217 \353\260\251\355\226\245\354\204\261 - \353\263\265\354\202\254\353\263\270.txt" new file mode 100644 index 0000000..26b68d3 --- /dev/null +++ "b/\355\217\254\354\235\270\355\212\270\354\240\201\353\246\275\352\260\234\353\260\234_db\354\277\274\353\246\254 \353\260\217 \353\260\251\355\226\245\354\204\261 - \353\263\265\354\202\254\353\263\270.txt" @@ -0,0 +1,32 @@ + * db 쿼리 +select + CONVERT(CHAR(19), a1.ps_date, 20) as ps_date, a2.ct_code, a2.ct_name, a1.ps_prname, + a1.ps_qty, a2.pe_bamt, a1.pe_id, a1.ps_no, isnull(a3.is_earn, 0) as is_earn +from + ps a1 + join pe a2 + on a1.pe_id= a2.pe_id and a2.ct_code != '' + left join disposable_earn_point_status a3 + on a3.pe_id= a1.pe_id and a3.ps_no= a1.ps_no + join ac a4 + on a4.pe_id= a1.pe_id and a4.ac_fncd2 not in ('01', '00') +where + a1.ps_prcode in ( + select pr_code from pr where kind_code= '1099' + ) + and a1.ps_date between '2025-01-05' and '2025-10-11' +order by + a1.pe_id desc; + +create table disposable_earn_point_status( + pe_id varchar, + ps_no varchar, + is_earn bit default 0, + udate datetime default getdate() +); + + + + + * 방향성 +현금 낸만큼 - 포인트사용 빼고 적립 \ No newline at end of file