I need a select statement which counts and divide based on conditions and authorization. I run into a problem with formula not accepting division if there is a authorization involved.... it will accept Multiplication and Addition etc. but not if its division..
This statement is working (with Multiplication)
(SELECT COUNT(Quote_Used) from Quotes WHERE Quote_Used='Used' AND Tradelane_Owner = '[@authfield:Company_Users_tbl_Company_ID]') * (SELECT COUNT(Quote_Used) from Quotes WHERE Quote_Used='Expired' AND Tradelane_Owner = '[@authfield:Company_Users_tbl_Company_ID]')
Same statement (with Division) is not working i.e. not accepted in the formula
(SELECT COUNT(Quote_Used) from Quotes WHERE Quote_Used='Used' AND Tradelane_Owner = '[@authfield:Company_Users_tbl_Company_ID]') /(SELECT COUNT(Quote_Used) from Quotes WHERE Quote_Used='Expired' AND Tradelane_Owner = '[@authfield:Company_Users_tbl_Company_ID]')
Same Statement (with Division) but without authorization will work and is accepted in formula
(SELECT COUNT(Quote_Used) from Quotes WHERE Quote_Used='Used') /(SELECT COUNT(Quote_Used) from Quotes WHERE Quote_Used='Expired')
Appreciate if anyone have ideas of what can be the issue!
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
Ras2019
Hi,
I need a select statement which counts and divide based on conditions and authorization. I run into a problem with formula not accepting division if there is a authorization involved.... it will accept Multiplication and Addition etc. but not if its division..
This statement is working (with Multiplication)
(SELECT COUNT(Quote_Used) from Quotes WHERE Quote_Used='Used' AND Tradelane_Owner = '[@authfield:Company_Users_tbl_Company_ID]') * (SELECT COUNT(Quote_Used) from Quotes WHERE Quote_Used='Expired' AND Tradelane_Owner = '[@authfield:Company_Users_tbl_Company_ID]')
Same statement (with Division) is not working i.e. not accepted in the formula
(SELECT COUNT(Quote_Used) from Quotes WHERE Quote_Used='Used' AND Tradelane_Owner = '[@authfield:Company_Users_tbl_Company_ID]') / (SELECT COUNT(Quote_Used) from Quotes WHERE Quote_Used='Expired' AND Tradelane_Owner = '[@authfield:Company_Users_tbl_Company_ID]')
Same Statement (with Division) but without authorization will work and is accepted in formula
(SELECT COUNT(Quote_Used) from Quotes WHERE Quote_Used='Used') / (SELECT COUNT(Quote_Used) from Quotes WHERE Quote_Used='Expired')
Appreciate if anyone have ideas of what can be the issue!
Sincerely
Ras
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.