dbTalk Databases Forums  

Using Range (no date type)

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Using Range (no date type) in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Stefano
 
Posts: n/a

Default Using Range (no date type) - 12-29-2004 , 10:37 AM






Hello,
I've a trouble with range value in olap.

I try to explain my problem whit this example:
I'm in using a cube ("Sell") from a table with this measure:

Name Sold_Unit Market Market_Share
-------------------------------------------------
Paolo 10 50 20%
Pippo 5 50 10%
Pluto 30 240 12,5%

(Other dimension let me filter on Product or Time)

In another SQL table I've a function that map the Market_share (in
range) in a Bonus value:

Mkt_Share_Min Mkt_Share_Max Bonus
--------------------------------------
0 10 0
11 13,4 80
13,5 25 100
25 999 120

Is there a way to insert in the cube 'Sell' a measure with the 'bonus'
value?
I'll wish obtain a cube like this

Name Sold_Unit Market Market_Share Bonus
--------------------------------------------------------------
Paolo 10 50 20% 100
Pippo 5 50 10% 0
Pluto 30 240 12,5% 80

I'm thinking to use a UDF that call a sql-query, but I don know how to
do


Thank's to all
Stefano

Reply With Quote
  #2  
Old   
Brian Altmann
 
Posts: n/a

Default RE: Using Range (no date type) - 12-29-2004 , 12:45 PM






You can create a view joining the tables with a clause such as:

on market_share between mkt_share_min and mkt_share_max

HTH,

Brian
www.geocities.com/brianaltmann/olap.html

"Stefano" wrote:

Quote:
Hello,
I've a trouble with range value in olap.

I try to explain my problem whit this example:
I'm in using a cube ("Sell") from a table with this measure:

Name Sold_Unit Market Market_Share
-------------------------------------------------
Paolo 10 50 20%
Pippo 5 50 10%
Pluto 30 240 12,5%

(Other dimension let me filter on Product or Time)

In another SQL table I've a function that map the Market_share (in
range) in a Bonus value:

Mkt_Share_Min Mkt_Share_Max Bonus
--------------------------------------
0 10 0
11 13,4 80
13,5 25 100
25 999 120

Is there a way to insert in the cube 'Sell' a measure with the 'bonus'
value?
I'll wish obtain a cube like this

Name Sold_Unit Market Market_Share Bonus
--------------------------------------------------------------
Paolo 10 50 20% 100
Pippo 5 50 10% 0
Pluto 30 240 12,5% 80

I'm thinking to use a UDF that call a sql-query, but I don know how to
do


Thank's to all
Stefano


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.