[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

RE: [sqr-users] RANK function



for some reason the line feed and carriage return was removed from the code, I 
will try again
 
begin-select
--
--
--
store.company_number &company_numbersku8
numbersku8.sku_6_digit &sku6_digit (,10)
sum(fst.current_send_store_qty) &transfered_qty (,20)
sum(fst.send_sku_retail_price_amt_lcy * fst.current_send_store_qty) 
&transfered_price 
rank() over (partition by store.company_number,sku8.sku_6_digit order by 
&transfered_price) &temp (,40)
--
--
--
end-select



> From: kaghdot@hotmail.com> To: sqr-users@sqrug.org> Date: Mon, 8 Jan 2007 
>22:20:44 +0000> Subject: [sqr-users] RANK function> > Hello,> I'm in the 
>process of writing a top 10 report. I want to take advantage of the DB2 
>function RANK> Here is the relevant code in the begin-select block:> 
>begin-select...store.company_number &company_numbersku8.sku_6_digit 
>&sku6_digit (,10)sum(fst.current_send_store_qty) &transfered_qty 
>(,20)sum(fst.send_sku_retail_price_amt_lcy * fst.current_send_store_qty) 
>&transfered_price rank() over (partition by 
>store.company_number,sku8.sku_6_digit order by &transfered_price) &temp 
>(,40)...end-select> I know that putting a SQR column variable is not correct 
>but I want to rank by that metric. Also, just to test the rank function I have 
>replaced the column variable with fst.send_sku_retail_price_amt_lcy but that 
>did not work either.> Does any one know how to use the RANK function in SQR? 
>please let me know what I'm doing wrong here.> > Thank you> 
>_________________________________________________________________> Fixing up 
>the home? Live Search can help.> 
>http://imagine-windowslive.com/search/kits/default.aspx?kit=improve&locale=en-US&source=wlmemailtaglinenov06>
> > _______________________________________________> sqr-users mailing list> 
>sqr-users@sqrug.org> http://www.sqrug.org/mailman/listinfo/sqr-users
_________________________________________________________________
Fixing up the home? Live Search can help.
http://imagine-windowslive.com/search/kits/default.aspx?kit=improve&locale=en-US&source=wlmemailtaglinenov06

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users