SQL- |
strSQL = "([]*(1-Nz([],0))+(nz([],0)+1)*" & Replace(CStr(Format(sng, "0.000000")), ",", ".") & ")" strSQL = "Select , " & strSQL & " as " _ & "From " _ & "Where ='" & str & "' and =" & lng & " "
https://www.sql.ru/forum/1310983/sql-zapros-dlya-vyborki-maksimalnogo