From fd02644360267e7c193b8a74816cc945094ff578 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A5=98=ED=98=B8=EC=84=B1?= Date: Mon, 22 Jun 2026 18:42:18 +0900 Subject: [PATCH] =?UTF-8?q?=EC=BF=BC=EB=A6=AC=20=EB=82=B4=EC=9A=A9=20?= =?UTF-8?q?=EB=B3=B4=EC=99=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 쿼리/Template/POR 소요예산 변경하기.sql | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/쿼리/Template/POR 소요예산 변경하기.sql b/쿼리/Template/POR 소요예산 변경하기.sql index 616bdbc..8ddefac 100644 --- a/쿼리/Template/POR 소요예산 변경하기.sql +++ b/쿼리/Template/POR 소요예산 변경하기.sql @@ -1,10 +1,25 @@ +-- ========================================== +-- 작업일자: YYYY-MM-DD [쿼리 작성 및 실행 날짜를 기록합니다.] +-- 작 성 자: [요청자 이름을 기록합니다.] +-- 작업목적: [쿼리 작성 및 실행 목적 설명] +-- 요청자/티켓번호: [요청 부서 또는 이슈 번호를 기록합니다.] +-- ========================================== + declare @por_no char(8), @por_seq int declare @amt decimal(16,4) -select @por_no = 'P2506009', @amt = 4698297087, @por_seq = 1 +-- [0] 변경할 데이터 설정 +set @por_no = 'P2506009' +set @amt = 4698297087 +set @por_seq = 1 + +-- [1] 대상 데이터 검증 (조회) +select * from HPOIMS.dbo.gm_por_detail where por_no = @por_no and por_seq = @por_seq + +-- [2] 발주의뢰서 금액 변경(수정/삭제 시 주석 처리 후 공유 권장) update HPOIMS.dbo.gm_por_detail set unitp = @amt, amt = @amt, w_unitp = @amt, w_amt = @amt, t_amt = @amt where por_no = @por_no and por_seq = @por_seq - +-- [3] 발주의뢰서 금액 변경에 따른 실행예산 투입실적금액 변경(수정/삭제 시 주석 처리 후 공유 권장) update HPOIMS.dbo.ys_pbudget set