Viewing 15 posts - 721 through 735 (of 5,504 total)
I'd rather use the CROSS APPLY approach to avoid "climbing up" two levels for each article node to get the name element. Performance impact can be significant depending on the...
January 5, 2012 at 1:43 pm
Koen Verbeeck (1/4/2012)
Did I miss anything...
January 5, 2012 at 10:22 am
I think I finally understood what you're looking for...
Will this be closer?
;
WITH cte AS
(
SELECT
LOB,
[Period] = [App Week],
[Bin Type] = BinTypes.BinType,
[Bin] = -- one row per original temp table
CASE
WHEN...
January 5, 2012 at 4:15 am
Would you please change the sample data you posted to reflect the columns you're using in your latest reply (e.g. [Homeowner Bin])?
January 4, 2012 at 3:20 pm
The problem you describe seems to different to the code you've posted.
In the code provided the two sections don't have enough in common: one is using the CUBE operator whereas...
January 4, 2012 at 3:04 pm
Here's the "straight forward" approach without the temp tables:
;
WITH cte AS
(
SELECT
LOB,
[Period] = [App Week],
[Bin Type] = 'Time to Fund',
[Bin] = [Time to Fund Bin],
Applications = SUM(Applications)
FROM #APPS AS a
GROUP BY
a.LOB,
[App...
January 4, 2012 at 2:15 pm
I think there's an easier solution to do it. But I'd like to test it before posting to make sure the code works as intended.
Therefore I'd like you to provide...
January 3, 2012 at 4:01 pm
Are you looking for something along those lines?
;
WITH cte AS
(
SELECT CAST(impressionDate AS DATE) AS supplier_date, count(*) AS impression_cnt
FROM [tbl_supplier_impressions]
GROUP BY CAST(impressionDate AS DATE)
),
cte2 AS
(
SELECT ...
January 2, 2012 at 5:41 pm
Based on your expected output requested eariler:
date | impressions | clicks | supplier id
12/2011 | 10 | 2 | guid
11/2011 | 8 | 5 | guid
10/2011 | 20 | 4...
January 2, 2012 at 5:30 pm
Based on your sampe data, what would be your expected result?
It's partially unclear since your expected result is grouped by month but also showing supplierid as part of the result...
January 2, 2012 at 5:17 pm
In that article is a section describing how to insert sample data (INSERT INTO ... SELECT) 😉
January 2, 2012 at 4:48 pm
As mentioned earlier: please read and follow the advice given in the first article in my signature.
We're all volunteers here trying to help. So it would be great if you...
January 2, 2012 at 4:19 pm
A reference table with UserId and ItemsId (both integer values) with a clustered index on UserId and ItemsId should be easy enough to query and should perform pretty good (assuming...
January 2, 2012 at 4:12 pm
Please provide DDL and sample data as well as expected output and what you've tried so far.
For a detailed description on how to provide data in a ready to use...
January 2, 2012 at 4:03 pm
duplicate post. no replies please (see original post)
January 2, 2012 at 4:02 pm
Viewing 15 posts - 721 through 735 (of 5,504 total)