Viewing 15 posts - 451 through 465 (of 2,171 total)
Also seems asked and answered here
April 22, 2009 at 6:44 am
Yes, NTEXT will be a problem.
If you are storing XML fragments, use XML datatype!
April 15, 2009 at 12:06 am
If there is a discrepancy between your test data and the test data supplied by both Mr Magoo and Mr Young, I would like to know.
The 2nd revision of the...
April 14, 2009 at 7:29 am
No problem Mr White.
CREATE FUNCTION dbo.fnParseList
(
@Text NVARCHAR(MAX)
)
RETURNS @Result TABLE (RowID SMALLINT IDENTITY(1, 1) PRIMARY KEY, Data NVARCHAR(MAX))
AS
BEGIN
DECLARE@NextPos INT,
@LastPos INT,
@Delimiter NCHAR(2)
SELECT@Delimiter = NCHAR(13) + NCHAR(10),
@NextPos = CHARINDEX(@Delimiter, @Text, 1),
@LastPos = 0
WHILE...
April 14, 2009 at 5:54 am
Put a clustered index on the table and the IDENTITY column.
Then create index over XML column.
April 14, 2009 at 3:41 am
Or a faster split UDF?
--- -> Peso solution
PRINT 'Start Peso solution'
SELECT @now = GETDATE()
--- Split text into lines
INSERT INTO @result
SELECT l.data
FROM @source s
CROSS APPLY dbo.fnParseList(CHAR(13), s.definition) l
--- Results
SELECT @duration =...
April 14, 2009 at 2:00 am
It's OK! Don't worry.
I have nothing to do besides awaiting the results from Adam's competition.
And for jsanborn to test the 2nd revision of the algorithm.
April 14, 2009 at 12:20 am
Thank you both.
Let's hear what Barry has to say about it.
Attached are second revision to deal with sample data provided by Barry.
It also works with the sample data provided by...
April 13, 2009 at 12:26 pm
Greate job Chris!
But you too will have to check for mutually exclusive records as with Mr Magoos test data.
EDIT: I tried your algorithm with the sample data provided by Mr...
April 13, 2009 at 4:28 am
Here is the revised algorithm, together with complete testcase from Mr Magoo.
April 13, 2009 at 3:40 am
Yes, becuase records 88-89 are mutually exclusive with record 90, since neither one of record 88-89 have common columns with record 90.
This edit seems to fix the problem
GROUP BYID,
minValue
HAVINGSUM(CASE WHEN...
April 13, 2009 at 3:17 am
I can spot the error in my algorithm now.
Record 80 and 81 are mutually exclusive, because they have no common columns populated so both records fulfill the criteria of having...
April 13, 2009 at 3:14 am
I guess everyone's happy with the suggestion posted 4/10/2009 8:44 PM?
April 13, 2009 at 2:48 am
Attached is a zip-file with working solutions for original problem.
Both files contains same algorithm.
One file is based on Barry's test data and one file is based on jsanborn's latest sample...
April 10, 2009 at 1:44 pm
Viewing 15 posts - 451 through 465 (of 2,171 total)