Viewing 11 posts - 391 through 401 (of 401 total)
So if I understand correctly:
SELECT
Customer_Number
,Product_ID
,SUM(Price) As TOTAL
FROM
CUSTOMER_PURCAHSES
WHERE
Product_ID = 'A'
AND Customer_Number NOT IN
(SELECT
Customer_Number
FROM
CUSTOMER_PURCAHSES
WHERE
Product_ID IN ('C','D') --Replace with the associated ID's
)
GROUP...
February 9, 2012 at 7:39 am
Personally I'd set up an SSIS package for this.
Import the csv file into a staging table that contains the relevent datatypes and non NULLable columns and do any transformations and...
February 9, 2012 at 7:20 am
This will SUM all products for the customers who have not bought C and D - Hope it helps
SELECT
Customer_Number
,SUM(Price) As TOTAL
FROM
CUSTOMER_PURCAHSES
WHERE
Customer_Number NOT IN
(SELECT...
February 9, 2012 at 6:49 am
Still not 100% sure what your after but if I have understood correctly you only want to SUM the customers who have purchased products 223,227 and no others if so...
February 9, 2012 at 5:12 am
I'm not 100% sure what you want as you've not really posted enough information
I've had a guess anyway is this what you are after?
SELECT
Customer_Number
,SUM(Price) As TOTAL
FROM
CUSTOMER_PURCAHSES...
February 9, 2012 at 4:47 am
Thanks for the "helpful" advice
Just in case anyone else is having this problem I solved it by cliking on on of the cells in my Tablix and in the properties...
January 13, 2012 at 2:02 am
January 11, 2012 at 8:49 am
I may have misunderstood (which is quite possible!) but is this what you are after?
declare @test-2 as table
(
StockCode Varchar (10)
,[Route] Int
,Operation Int
)
Insert @test-2
Values ...
January 11, 2012 at 5:25 am
Check the expression on your textbox6, are you trying to use two aggregates one nested inside the other i.e. Avg(Sum(Fields!Field)). As the error says you cannot nest aggregate functions
January 10, 2012 at 4:22 am
Hi
Just a suggestion but in your result set don't *100, let the number formatting do that for you If thats not possible you could always divide your result set...
November 16, 2011 at 3:57 am
Viewing 11 posts - 391 through 401 (of 401 total)