here's my condition:
int count =0;
if (percent >100){
count = 1;
value = 50;
}
else if (percent >=90 || percent <100){
count = 1;
value = 40;
}
.
.
.
I want to get the counter in the particular ramge of percentage and sum the value up...for example if i get the counter of 4 in the...
Add some more..I did not use max(effective_date) because the result return is not the value I want. The max(effective_date) make every diffrent chassis_no return same trade_in_amt because the key here is:
invoice.model = margin_limit.model
AND
invoice.booking_date >=...
actually Im in a frust condition..because im now want to combine 2 query by using report tool call "Formula One".
(1) select i.trade_in_discount from invoice i where branch='CRII' and model='ZFL' and trade_in_value<>0
(2) select ml.trade_in_amt from margin_limit ml, invoice i2 where...
i need to return only one result. but why the query below return 7 rows? im sure that (chassis_no + model) is unique. where did the query goes wrong???
select effective_date, trade_in_amt from margin_limit ml, invoice i where branch='CRII' and i.model='ZFL' and i.chassis_no='A00011' and...
I'd tried out Marc's idea, return error:
SQL0104N An unexpected token "from" was found following
"x(ml2.effective_date". Expected tokens may include: ")". SQLSTATE=42601
With T.Blom's idea, return error:
SQL0206N "#RANK" is not valid in the context...
I wish to use sql query to do some operations.
My 1st sql is shown as below:
(1) select i2.trade_in_discount from invoice i2, model_chassisno mc where i2.trade_in_value <> 0 and i2.model = mc.model and i2.model in('ZFL') and i2.chassis_no = mc.chassis_no
returned 2 resuls:
TRADE_IN_DISCOUNT...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.