From e0a36a21b9241306db3fde2078bee3be93530e84 Mon Sep 17 00:00:00 2001 From: newton-cn Date: Sat, 11 Jan 2025 12:36:29 +0900 Subject: [PATCH] =?utf8?q?=EC=9D=BC=ED=9A=8C=EC=9A=A9=20=EC=A0=81=EB=A6=BD?= =?utf8?q?=EA=B0=9C=EB=B0=9C=20=EC=B0=B8=EA=B3=A0.txt=20=EA=B8=B0=EB=A1=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- ... \353\260\251\355\226\245\354\204\261.txt" | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 "\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.txt" 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.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.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.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 -- 2.43.0