Thank you, give me it a try.
I was not able to get the sql code to work, so went back to basic and all works with one exception
sql = "select escrow as VAL1 from rates where SalesPrice >= "& SalesPrice
Works great except that if the SalePrice <10000 then I get this error:
Arithmetic overflow error converting varchar to data type numeric.
All of the fields in the database are varchar (50). If the Salesprice is $10,000 or higher - NO ERROR!
Any suggestions?
Thanks
make numeric fields numeric
Tried that same issue, oddly enough.
you did? would you mind doing a SHOW CREATE TABLE please
Not sure what you are referring too, please explain. Even my IT guy changed the types and no different result. The table starts at 60000 and works at less than that until you get to <10000.
I guess you could run the query in a script or app. Often I prefer to simply use the CLI
I will check with my IT guy and reply at that time. Thank you.
maybe you could get him to write your query for you too… just an idea
He doesn’t do that. But I had a work around since it was weird that under 10000 it had that error and since the table starts at a SalesPrice of $60,000, I did this to remove the error:
if SalesPrice > 10000 then
sql = "select escrow as VAL1 from rates where SalesPrice >= "& SalesPrice
else
sql = "select escrow as VAL1 from rates where SalesPrice >= '60000'"
end if
With the above code all works fine.
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.