Viewing 11 posts - 391 through 402 (of 402 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...
==========================================================================================================================
A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe
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...
==========================================================================================================================
A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe
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...
==========================================================================================================================
A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe
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...
==========================================================================================================================
A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe
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...
==========================================================================================================================
A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe
February 9, 2012 at 4:47 am
Will This do what you need?
==========================================================================================================================
A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe
February 9, 2012 at 4:17 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...
==========================================================================================================================
A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe
January 13, 2012 at 2:02 am
Another good add-on is the SSMS Tool Pack - Its Free and available Here[/url]
==========================================================================================================================
A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe
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 ...
==========================================================================================================================
A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe
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
==========================================================================================================================
A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe
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...
==========================================================================================================================
A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe
November 16, 2011 at 3:57 am
Viewing 11 posts - 391 through 402 (of 402 total)