Viewing 15 posts - 31 through 45 (of 67 total)
Ok, this is my final version:
create table #tmp(orderId int, ProductGroup varchar(50));
--insert into #tmp(orderId , ProductGroup , groups_bought)
with myCTE(orderId,ProductGroup, groups_bought)
as
(
select orderId
, ProductGroup , count(ProductGroup) groups_bought
from #OrderDetail detail
inner join #Product prod
on prod.productid=detail.productid
group...
January 9, 2009 at 3:12 pm
The query below should give you all the orders that have products from more then 1 group.
with myCTE(orderId,ProductGroup, groups_bought)
as
(select orderId
, ProductGroup , count(ProductGroup) groups_bought
from #OrderDetail detail
inner join #Product prod
on prod.productid=detail.productid
group...
January 9, 2009 at 2:52 pm
Hey Rathna,
I have tried to condense what you need to do below.... Pls post the output after running the select query.
There may be too much data: just post the first...
January 9, 2009 at 2:00 pm
Please do your home-work yourself....
PS: 😛
Jeff was right!
January 9, 2009 at 12:54 pm
Please provide sample scripts.... to create schema and insert data.
Read guidelines using the link below (How to post)
thanks,
January 9, 2009 at 11:56 am
I would say - since you are in any case going to modify the scripts, why not change the 'select *' also.
The advice above makes eminent sense...
January 9, 2009 at 11:47 am
Just a thought - Would SSIS help here?
The user obviously has a LOT of data to load. But using SSIS would mean they don't need those scripts anymore.
I think the...
January 9, 2009 at 11:32 am
They are not that bad ... afaik triggers in sql server dont work on individual inserts in a transaction...
January 9, 2009 at 11:13 am
Aargh .... I just tested a sample table - even with a trigger you will probably need to change the scripts.
Otherwise the Select * is failing...
Any gurus with a better...
January 9, 2009 at 10:53 am
I have not done something like this ... but I would guess you would need to define some triggers on insert...
January 9, 2009 at 10:38 am
Shoot..... I forgot to divide by the count in my script....
January 8, 2009 at 1:49 pm
You extinguished my desire to help you by the fact that you did not provide sample scripts.
And this is not the first time you are coming on this forum ....
Anyways...
January 8, 2009 at 1:11 pm
Please read the guidelines on posting queries.
You need to provide sample script to recreate the table and insert data in to it.
Having said that, this should suffice in your case:
update...
January 8, 2009 at 1:01 pm
In that case the only thing I would suspect is the location parameter that is being passed.
Via the ASP page there is a certain value that is making the loop...
January 8, 2009 at 10:59 am
I dont see lot of information to go on.
You say that the SP works when you see in query analyzer - but we do know that it works 99 times
from...
January 8, 2009 at 10:46 am
Viewing 15 posts - 31 through 45 (of 67 total)