Viewing 15 posts - 3,106 through 3,120 (of 4,085 total)
Actually, I don't think that any of the responses are technically correct. While #4 returns similar results to #1, they are not the same. Specifically, #1 returns integers...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
June 20, 2012 at 12:53 pm
dwain.c (6/20/2012)
Drew hit the nail on the head. My bug, my bad!But I can correct it without the CROSS APPLY!
You can, but I find the CROSS APPLY simpler and...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
June 20, 2012 at 10:07 am
It really helps if you give your threads a more descriptive title. The title "SQL Query" applies to every single thread that belongs in this forum. (I can't...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
June 20, 2012 at 9:34 am
Yes, the problem is that the width is being used for both Dim1 and Dim2. So the max of the values 4.5, 4.5, 7 is 7 and the max...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
June 20, 2012 at 9:09 am
vinu512 (6/19/2012)
Then what is the use of:root('MyString'), type).value('/MyString[1]','varchar(max)'
You really need to understand how to parse the expression and it really helps to understand the Backus-Naur Form (BNF) descriptions in BOL....
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
June 20, 2012 at 8:26 am
vinu512 (6/19/2012)
Can you post a link where there is a good explanation on the STUFF Function, the way it is being used here??
The BOL entry for STUFF (Transact-SQL) gives a...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
June 19, 2012 at 8:14 am
There are several problems with your code.
First, your "AND" condition isn't correct. You want to modify a node where the same node meets both conditions, but the way that...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
June 18, 2012 at 8:23 am
Just to clarify, integers can be implicitly converted to date/time data. DATEADD() converts the supplied integer to the required datetime data type.
The reason that 4 (1900-01-05) is used, is...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
June 14, 2012 at 11:45 am
Ste_P (6/13/2012)
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
June 14, 2012 at 6:43 am
cfradenburg (6/5/2012)
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
June 5, 2012 at 12:15 pm
That doesn't work Lynn, because the OrderDate is not in the GROUP BY, so it cannot be used in the ORDER BY clause unless it's in an aggregate function (which...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
June 5, 2012 at 11:31 am
villanueva.jonel (6/5/2012)
Declare @Fromdatetime datetime, @todatetime datetime
Set @fromdatetime =dateadd(day,datediff(day,0,'2012/06/04'),'00:00')
Set @todatetime=dateadd(day,datediff(day,0,'2012/06/05'),'00:00')
If you only supply a date for a datetime field, the time is defaulted to midnight, so the above is unnecessarily complex....
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
June 5, 2012 at 9:09 am
People are hesitant about opening attachments, because it could potentially contain malware. Jeff Moden has great article: Forum Etiquette: How to post data/code on a forum to get the...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
June 5, 2012 at 8:53 am
Smash125 (6/4/2012)
...
For Quarter3 we can observe August comes first,then July and...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
June 5, 2012 at 8:46 am
Adam Machanic (6/4/2012)
David Moutray (6/4/2012)
I don't know what was in the Original Poster's mind, but I heard Adam Machanic recommend putting the commas for multi-line statements at the beginning of...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
June 5, 2012 at 8:32 am
Viewing 15 posts - 3,106 through 3,120 (of 4,085 total)