260422_01_ENH: 여성이 2개 나오는 내용 수정
This commit is contained in:
@@ -135,12 +135,14 @@ case "RecruitGender"
|
||||
DBConnect()
|
||||
|
||||
SQL = ""
|
||||
SQL = SQL &" select *, case when r_gender = '1' then '남성' else '여성' end gender, cast(cnt as float)/cast(tcnt as float)*100 as per from "&VbCrlf
|
||||
SQL = SQL &" ( "&VbCrlf
|
||||
SQL = SQL &" select r_gender, count(r_gender) as cnt, (select count(*) from exitpoll.dbo.R_info where flag='1') as tcnt from exitpoll.dbo.R_info "&VbCrlf
|
||||
SQL = SQL &" where Flag='1' "&VbCrlf
|
||||
SQL = SQL &" group by r_gender "&VbCrlf
|
||||
SQL = SQL &" ) a "&VbCrlf
|
||||
SQL = SQL & " select *, case r_gender when '1' then '남성' when '2' then '여성' else 'NULL' end gender, cast(cnt as float)/cast(tcnt as float)*100 as per from " & VbCrlf
|
||||
SQL = SQL & " ( " & VbCrlf
|
||||
SQL = SQL & " select r_gender, count(r_gender) as cnt, (select count(*) from exitpoll.dbo.R_info where flag='1') as tcnt from exitpoll.dbo.R_info " & VbCrlf
|
||||
SQL = SQL & " where Flag='1' " & VbCrlf
|
||||
SQL = SQL & " group by r_gender " & VbCrlf
|
||||
SQL = SQL & " ) a " & VbCrlf
|
||||
SQL = SQL & " WHERE cnt > 0 " & VbCrlf
|
||||
|
||||
Objdb.Open SQL,DBConn,3,1,1
|
||||
|
||||
If not objdb.eof Then
|
||||
|
||||
Reference in New Issue
Block a user