Viewing 15 posts - 6,166 through 6,180 (of 8,731 total)
Ideally, you would have a calendar table to join your data table. If you don't, you can build one on the fly with a CTE similar to a tally or...
July 8, 2014 at 9:39 am
That's the beauty of cross tabs. When you need more information than a simple pivot will give, the cross tabs approach will be more flexible and cross tabs shows more...
July 8, 2014 at 9:30 am
You might be able to use a different query by using cross apply. However, it might be worse for performance.
The correct option is to write all the columns in the...
July 7, 2014 at 3:34 pm
Could you post DDL, sample data (as insert into statements) and expected results based on that data? You can read the article linked on my signature to know how to...
July 7, 2014 at 2:42 pm
You can use ISNULL() on each column pivoted (ISNULL([Oranges], 0) as Oranges) or you could try a pre-aggregated Cross tab which might give you a performance boost.
SELECT SalesPerson,
...
July 7, 2014 at 2:38 pm
Stefan Krzywicki (7/7/2014)
Luis Cazares (7/7/2014)
patrickmcginnis59 10839 (7/7/2014)
Luis Cazares (7/7/2014)
July 7, 2014 at 2:28 pm
Eirikur Eiriksson (7/7/2014)
Luis Cazares (7/7/2014)
July 7, 2014 at 1:43 pm
patrickmcginnis59 10839 (7/7/2014)
Luis Cazares (7/7/2014)
July 7, 2014 at 1:41 pm
The problem is that you're still thinking of procedural programming, there's nothing wrong on thinking like that, but you should change it when working with SQL. If you use a...
July 7, 2014 at 1:17 pm
sqldriver (7/7/2014)
Jeff Moden (7/7/2014)
Luis Cazares (7/7/2014)
david.holley (7/7/2014)
Jeff Moden (7/7/2014)
jfogel (7/7/2014)
July 7, 2014 at 1:02 pm
I'll start using Oracle :sick: at my job. As a SQL/BI Developer, it seems that most of the knowledge can be transferred easily between tools, but I'm just starting to...
July 7, 2014 at 12:51 pm
I'm not sure if you're expecting something like this.
CREATE TABLE PSITableFinal
(DivisionRegion char(1),
PSIYear char(4),
PSIMonth ...
July 7, 2014 at 12:18 pm
wolfkillj (7/7/2014)
Luis Cazares (7/7/2014)
wolfkillj (7/7/2014)
Sean Lange (7/2/2014)
Stefan Krzywicki (7/2/2014)
Sean Lange (7/2/2014)
Stefan Krzywicki (7/2/2014)
Koen Verbeeck (7/2/2014)
Jo Pattyn (7/1/2014)
Anyway the Belgium Red Devils got past the USA soccer team after a...
July 7, 2014 at 10:53 am
Is the value from Id_Wells on Wells table unique? Or can it have duplicates?
July 7, 2014 at 10:45 am
July 7, 2014 at 10:42 am
Viewing 15 posts - 6,166 through 6,180 (of 8,731 total)