Viewing 15 posts - 7,606 through 7,620 (of 8,416 total)
declare @s varchar(500), @x xml;
select@s='1,2,3,4,5',
@x = '' + REPLACE(@s, ',' , '') + '';
selecta.value('.', 'int') as s
from@x.nodes('/a') t(a)
edit: I see 'Pandian S' beat me to it with the XML hack/solution...
June 25, 2009 at 3:19 am
RBarryYoung (6/24/2009)
Cool. No rush, just curious... 😉
Cool. I want the time to see if I can work out what one of your 'improved' compression methods might be...
June 25, 2009 at 1:24 am
RBarryYoung (6/24/2009)
Hey Paul, did you ever get a chance to decipher my compressed SQL? 🙂
No more than running it so far - Real Life got partly in the way...
June 24, 2009 at 11:16 pm
HA! So have you all seen the featured article[/url] today?
I think the stand out phrase for me is "I will be using the power of XML" :w00t:
Reminds me of:
June 24, 2009 at 10:30 pm
I've never seen anything to suggest that is necessary, no.
My favourite article for this stuff on here is http://www.sqlservercentral.com/articles/SQL+Server+2005+-+Security/sql2005symmetricencryption/2291/
There are plenty though - search the tags if you are interested.
Paul
June 24, 2009 at 9:41 pm
Just in case there is any doubt at all about this: If you specify a file group for a clustered index (primary key or unique constraint) in a CREATE TABLE...
June 24, 2009 at 9:36 pm
Gift Peddie (6/24/2009)
June 24, 2009 at 9:19 pm
That would work, but I have a feeling Flo is about to delight and amaze everyone with a rather nifty running-totals implementation.
Just a guess :w00t:
June 24, 2009 at 8:18 pm
Generally speaking, the query optimizer doesn't much care how you write your queries.
Ok, so that is a bold statement - but it is at least partly true, at least to...
June 24, 2009 at 8:16 pm
DCPeterson (6/24/2009)
June 24, 2009 at 8:00 pm
Carl Federl (6/24/2009)
June 24, 2009 at 7:48 pm
Cool.
Though the two queries are not exactly the same - check the query plans for both 😉
Also, I assumed you wanted the student ids concatenated in ascending order - you...
June 24, 2009 at 7:36 pm
Could I ask also that you confirm that we should compute the running totals in descending percentage order?
For example, if the available percentages were 35%, 20%, 15%, 10% and 5%...
June 24, 2009 at 7:30 pm
lmu92 (6/24/2009)
What indexes would you consider as "appropriate"?
A nonclustered index on ACCT_DEBTOR with OCCURRENCE and LANDLINE_CONTACT_NO as included columns, I think.
(I would also be naturally inclined to create a clustered...
June 24, 2009 at 7:25 pm
CREATE TABLE #Class (row_id INT IDENTITY PRIMARY KEY, class_id INT NOT NULL, student_id INT NOT NULL);
CREATE TABLE #Classes (class_id INT PRIMARY KEY, student_list VARCHAR(8000) NOT NULL);
-- Test Data
INSERT#Class (class_id, student_id)...
June 24, 2009 at 7:07 pm
Viewing 15 posts - 7,606 through 7,620 (of 8,416 total)