260521_02_ENH: 사전답사 pkey 변경 및 투표소 코드 관련된 정리

This commit is contained in:
2026-05-21 12:26:18 +09:00
parent ed52d4cdfd
commit 09893c6b3a
3 changed files with 36 additions and 32 deletions

View File

@@ -59,7 +59,11 @@ case "code"
SQL = " select gubun, r_cd, r_nm, Flag from exitpoll.dbo.R_code where Flag = '1' and gubun = '" & sel_code & "' "
if sel_code = "district" Then
SQL = SQL & " and left(r_cd,2) = '" & Request("area_cd") & "' "
if LEN(Request("area_cd")) > 2 then
SQL = SQL & " and len(r_cd) > 4 and left(r_cd,4) = '" & Request("area_cd") & "' "
else
SQL = SQL & " and len(r_cd) < 5 and left(r_cd,2) = '" & Request("area_cd") & "' "
end if
End If
Objdb.Open SQL,DBConn,3,1,1
if not Objdb.eof Then