korthof
asked on
Complex SQL Math Statement
I need help deriving a sql statement that can select a specific criteria from my database.
<%
Set Con = Server.CreateObject("ADODB .Connectio n")
Con.Open Application("DSN_Pipeline" )
Set catRS2 = Server.CreateObject( "ADODB.Recordset" )
catRS2.Open "SELECT * FROM AllJobTbl", Con
sqlString = "SELECT CASE CurrentValue WHEN 0 THEN 0 ELSE (Balance / CurrentValue) END AS column_alias FROM AllJobTbl"
Dim objrs
Set objrs = Con.Execute(sqlString)
%>
I need All Balance / Current Value to display those that are <= .65
also where "Credit" = "Fair" or "Poor"
WHERE "State" = AL, CA
And I need it to response a viewable table back to an asp page.
I cant seem to understand how to prevent buffer overflow on response.
<%
Set Con = Server.CreateObject("ADODB
Con.Open Application("DSN_Pipeline"
Set catRS2 = Server.CreateObject( "ADODB.Recordset" )
catRS2.Open "SELECT * FROM AllJobTbl", Con
sqlString = "SELECT CASE CurrentValue WHEN 0 THEN 0 ELSE (Balance / CurrentValue) END AS column_alias FROM AllJobTbl"
Dim objrs
Set objrs = Con.Execute(sqlString)
%>
I need All Balance / Current Value to display those that are <= .65
also where "Credit" = "Fair" or "Poor"
WHERE "State" = AL, CA
And I need it to response a viewable table back to an asp page.
I cant seem to understand how to prevent buffer overflow on response.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I assume they are decimal(x,2) otherwise you might have problems with rounding or the display format.