Viewing 15 posts - 3,181 through 3,195 (of 4,085 total)
marksquall (5/3/2012)
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
May 3, 2012 at 10:04 am
I agree with you that CROSS JOIN being explicit is a superior syntax, for readability mainly. I don't use commas that way for that exact reason. But your...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
May 3, 2012 at 9:46 am
Jeff Moden has a great article on this very subject. Cross Tabs and Pivots, Part 1 – Converting Rows to Columns[/url]
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
May 2, 2012 at 2:13 pm
It clearly says,
Joins that use the deprecated syntax fall into two categories:
Inner Join
...
Outer Join
or were you referring to not finding CROSS JOIN?
It doesn't specifically state anything about CROSS JOINS. ...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
May 2, 2012 at 12:27 pm
Cadavre (5/2/2012)
FROM CTE x, CTE y;
drew.allen (5/2/2012)
This join syntax has been deprecated. You shouldn't be using it in new development. Use CROSS JOIN instead.
GSquared (5/2/2012)
The Outer Join...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
May 2, 2012 at 11:03 am
Cadavre (5/2/2012)
NLV (5/2/2012)
Hi,I want to insert 100 rows like (1,2,3,4,..100) without using loops into a table using CTE. can you please help.
WITH CTE(n) AS(SELECT 1
...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
May 2, 2012 at 7:17 am
Please don't start multiple threads on the same topic. It fragments the replies.
Please post in the original thread: http://www.sqlservercentral.com/Forums/Topic1293567-338-1.aspx.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
May 2, 2012 at 6:58 am
I think that this is just a language problem. When Sean said to replace = with IN, he only meant the one in the WHERE clause, not all of...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
May 2, 2012 at 6:53 am
You want to be careful here. Life isn't nearly as simple as your model implies. For example, someone could get married, divorced, and then re-married. Their current...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
April 30, 2012 at 6:59 am
Sean Lange (4/26/2012)
bpowers (4/26/2012)
Not yet, but I am working on it. It didn't like the P.USED.
Not sure what you mean by "It didn't like". 😛
I should be the same as...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
April 26, 2012 at 12:18 pm
It's actually very easy. It's simply concatenating two conditional expressions together. The SSRS equivalent would be something like the following
=IIf(InStr(VIEW_Creditors.DISCREPENCY_CODE.value, Parameters!Contingent_Code.value) > 0, Parameters!Contingent_Code.value, "") & IIf(InStr(VIEW_Creditors.DISCREPENCY_CODE.value, Parameters!Unliquidated_Code.value)...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
April 25, 2012 at 2:37 pm
The problem is that you're trying to do it all with one function, but you need separate functions for each week.
SELECT Resp_ID, Brand
,COUNT(DISTINCT CASE WHEN [Week] = 2 THEN Q5...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
April 25, 2012 at 7:31 am
ColdCoffee (4/24/2012)
But if u insist in using single query to do that, then u...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
April 25, 2012 at 6:54 am
Here is how I would approach this.
WITH CTE AS (
SELECT DateValue, [Value], ROW_NUMBER() OVER( PARTITION BY DateValue, [Value] ORDER BY (SELECT 1) ) AS rn
FROM #tableOne
EXCEPT
SELECT DateValue, [Value], ROW_NUMBER() OVER(...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
April 24, 2012 at 12:59 pm
I agree with Lynn here. If you can't represent your problem with 50 or fewer records, then your problem is probably too complex to solve in a forum post.
Also,...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
April 24, 2012 at 12:40 pm
Viewing 15 posts - 3,181 through 3,195 (of 4,085 total)