Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by meracle

  1. meracle

    Sum and Count using array, vector???

    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...
  2. meracle

    using sql query to do (+, -, *, /) - -&gt;HOW???!

    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 >=...
  3. meracle

    using sql query to do (+, -, *, /) - -&gt;HOW???!

    actually Im in a frust condition..because im now want to combine 2 query by using report tool call &quot;Formula One&quot;. (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...
  4. meracle

    using sql query to do (+, -, *, /) - -&gt;HOW???!

    no, inside margin_limit table don't have chassis_no...i know the reason. anywhere, thanks!
  5. meracle

    using sql query to do (+, -, *, /) - -&gt;HOW???!

    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...
  6. meracle

    using sql query to do (+, -, *, /) - -&gt;HOW???!

    Yeahh...I got it! Marc, thanks!
  7. meracle

    using sql query to do (+, -, *, /) - -&gt;HOW???!

    I'd tried out Marc's idea, return error: SQL0104N An unexpected token &quot;from&quot; was found following &quot;x(ml2.effective_date&quot;. Expected tokens may include: &quot;)&quot;. SQLSTATE=42601 With T.Blom's idea, return error: SQL0206N &quot;#RANK&quot; is not valid in the context...
  8. meracle

    using sql query to do (+, -, *, /) - -&gt;HOW???!

    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...

Part and Inventory Search

Back
Top