Viewing 15 posts - 841 through 855 (of 3,957 total)
Row ordering is never guaranteed on retrieval unless you explicitly specify ORDER BY.
It just so happens that the times are being retrieved in order because that's probably the order you...
January 29, 2014 at 5:32 pm
oliver.morris (1/29/2014)
Thanks Dwain,Will give this a try and try the unpivot alternative, looks good.
Is performance better than unpivot?
Cheers
Oliver
There's a performance comparison in the linked article, but the short answer is...
January 29, 2014 at 1:25 am
oliveraustin (1/28/2014)
Since the Roles with multiple groups consist of<=12 groups and the rest of the all I...
January 28, 2014 at 7:30 pm
Evil Kraig F (1/28/2014)
dwain.c (1/28/2014)
That user alone would generate POWER(2,32)-1 rows (working from memory here so check the article to be sure). That's a lot of rows.
Amusingly:
select power(2...
January 28, 2014 at 7:07 pm
Check the following article:
Logging and Error Handling for SQL Stored Procedures [/url]
In the TRY steps, where it captures the error information, you can add code to send your email alert.
You...
January 28, 2014 at 5:57 pm
pietlinden (1/24/2014)
You might want to read Dwain Camps' article on Creating Dynamic Crosstabs... that might give you some ideas.
Nice thought, but I think you're referring to the articles by Jeff...
January 28, 2014 at 5:54 pm
Check the first link in my signatures for another concept you can apply to this (the CROSS APPLY VALUES approach to UNPIVOT).
SELECT citation
FROM
(
SELECT b.citation, a.header, a.rn,...
January 28, 2014 at 5:51 pm
I would bet it's not memory that's the issue. It's row counts.
Consider the case where you said you have one user in 32 groups. That user alone would...
January 28, 2014 at 4:00 pm
AndrewSQLDBA (1/27/2014)
That did the trick for that. What are you talking about, "special characters"? You did not include the article. There are some rows that use RTF data, would...
January 27, 2014 at 11:48 pm
pietlinden (1/27/2014)
...and then I saw the odd requirement (show all permutations)
...
Technically what the OP is looking for is combinations (not permutations).
January 27, 2014 at 8:45 pm
If your fiscal year always starts on April Fool's Day, you don't even need the master table:
WITH Detail_table (Cust_no, [Date]) AS
(
SELECT 'A',CAST('2011-07-15' AS DATETIME) -- 15/07/11
UNION ALL SELECT 'B','2011-09-21' --21/09/11
UNION...
January 27, 2014 at 6:00 pm
Here's my interpretation of your requirement:
WITH SampleData (C1, C2) AS
(
SELECT 'A', 'AA'
UNION ALL SELECT 'A', 'BB'
UNION ALL SELECT...
January 27, 2014 at 5:38 pm
Take a look at this SQL Spackle article by Wayne Sheffield: Creating a comma-separated list[/url]
SELECT DocumentDataID=MIN(DocumentDataID), PersonDataID
,DocumentData=
(
...
January 27, 2014 at 5:32 pm
Take a look at this article:
Generating n-Tuples with SQL[/url]
Then look into the discussion thread for a slight performance improvement on the approach:
http://www.sqlservercentral.com/Forums/Topic1301485-3122-5.aspx
Coding up the improved approach with your sample data...
January 27, 2014 at 5:21 pm
Lowell,
I'm sure you already know this but there are times that CPU can be quite a lot more than elapsed time, specifically when SQL parallelizes a query. That doesn't...
January 27, 2014 at 5:07 pm
Viewing 15 posts - 841 through 855 (of 3,957 total)