This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private sum_m() as integer | |
・ | |
・ | |
・ | |
redim sum_m(2) | |
・ | |
・ | |
・ | |
redim sum_m(0) = sum_m_atai | |
redim sum_m(1) = sum_m_atai2 | |
redim sum_m(2) = sum_m_atai3 | |
・ | |
・ | |
・ | |
private function setkansusql(byref i_tSql as string,_ | |
byval datei as string) as boolean | |
const animal_num as string = "setkasusql" | |
dim tSql as string | |
dim aquarium as dao.recordset | |
dim cntn as integer | |
on error goto err_proc | |
setkansusql = false | |
for cntn = lbound(sum_m) to ubound(sum_m) | |
i_tSql = i_tSql & sum_m(cntn) & "," | |
tSql = "" | |
tSql = "select 売上区分 from 資金情報" | |
tSql = tSql & "where 売上コード = " & sum_m(cntn) | |
set aquarium = dbinfo.openrecordset(tSql,dbopendynaset) | |
if aquarium.eof then | |
call showmsg(aquarium_num,animal_num,"データが見つかりませんでした。") | |
exit function | |
end if | |
i_tSql = i_tSql & "'" & trim(aquarium.fields(0).value) & "'," | |
set aquarium = nothing | |
tSql = "" | |
tSql = "select sum(100万) from 売上情報" | |
tSql = tSql & "where 日付 = " & format(datei,"yyyymmdd") | |
tSql = tSql & "and 決済区分 = " & netd | |
tSql = tSql & "and 計上コード = " & funds1 | |
tSql = tSql & "and 団体コード = " & funds2 | |
tSql = tSql & "and 発生元 = " & sum_m(cntn) | |
tSql = tSql & "group by 日付,決済区分,計上コード,団体コード,発生元" | |
set aquarium = dbinfo.openrecordset(tSql,dbopendynaset) | |
if aquarium.eof then | |
i_tSql = i_tSql & minimumdate & "," | |
else | |
i_tSql = i_tSql & aquarium.fields(0).value & "," | |
end if | |
set aquarium = nothing | |
next cntn | |
setkansusql = true | |
exit function | |
err_proc: | |
if not aquarium is nothing then set aquarium = nothing | |
call showmsg(aquarium_num,animal_num,err.description) | |
end function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment