Showing posts with label product. Show all posts
Showing posts with label product. Show all posts

Wednesday, March 21, 2012

del dupes

record# cat product
1 fish halibut
2 fish halibut
I need a script to find all records with duplicates similar to the scenario
above and delete the duplicates, in this case record#2. Thank you.Try:
;with x
as
(
select
*
, row_number () over (partition by cat, product order by cat product)
as row_num
from
MyTable
)
delete x
where
row_num > 1
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"morphius" <morphius@.discussions.microsoft.com> wrote in message
news:31A254C8-43FE-4FCE-9DB8-0B06FF18B6DB@.microsoft.com...
record# cat product
1 fish halibut
2 fish halibut
I need a script to find all records with duplicates similar to the scenario
above and delete the duplicates, in this case record#2. Thank you.|||> I need a script to find all records with duplicates similar to the
> scenario
> above and delete the duplicates, in this case record#2. Thank you.
Same question was posted and answered in .programming yesterday. Have a
look.

Friday, March 9, 2012

Defining Hirarchies Accross Dimensions

I have a cube whose dimensions include Product and Product Group. The Product Group has a Many-To-Many relationship with the cube through a bridge table to the Product dimension. Whenever I want to see the sales for product by product group on the cube browser I associate these two dimensions manually (dragging and dropping to create a hierarchy). Is it possible to define this hierarchy in the Product or Product Group dimension? Thanks in advance

+ Product Group

++++ Product

No, it is not possible to create a hierarchy spawns several dimensions.

But on the other side, try to see is there way you might be able to model your Product dimension to include ProductGroup attribute in it.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Thanks,

I know you should include these things in the product dimension, but the thing is that according to the business rules, these product groups could be anything because the users define these dynamically: regional areas, brands, etc. Moreover, a product could belong to many product groups and viceversa. This is why I had to create the group as a separate dimension.