Viewing 15 posts - 5,971 through 5,985 (of 10,144 total)
Here's the output of the rCTE:
LevelParentItemIDChildItemIDList
1121>2
2231>2>3
2241>2>4
2251>2>5
3481>2>4>8
3361>2>3>6
3371>2>3>7
4791>2>3>7>9
47101>2>3>7>10
sku370870 (7/31/2012)
It produces in the list column:
1>2
1>2>3
1>2>4
1>2>5
1>2>4>8
1>2>3>6
1>2>3>7>9
1>2>3>7>10
What I need it to produce is:
1>2
1>2>3
1>2>3>6
1>2>3>7
1>2>3>7>9
1>2>3>7>10
1>2>4
1>2>4>8
1>2>5
I've tried various sorting but I can't...
July 31, 2012 at 5:34 am
demonfox (7/31/2012)
http://www.sqlservercentral.com/Forums/Topic1337063-391-1.aspx
This link doesn't work.
July 31, 2012 at 5:30 am
Abu Dina (7/31/2012)
Try it out. There's always an element of tuning with...
July 31, 2012 at 5:28 am
Here's a rCTE to get you started:
;WITH rCTE AS (
SELECT
[Level] = 1,
tr.ParentItemID, tr.ChildItemID,
List = CAST(CAST(tr.ParentItemID AS VARCHAR(10)) + '>' + CAST(tr.ChildItemID AS VARCHAR(10)) AS VARCHAR(8000))
FROM #tblItemRelationship...
July 31, 2012 at 4:44 am
Here you go mate:
CREATE FUNCTION [dbo].[FuzzyMatch_iTVF2k5]
(
@Reference VARCHAR(100),
@Target VARCHAR(100)
)
RETURNS table
AS
-- See also http://research.microsoft.com/pubs/75996/bm_sigmod03.pdf
RETURN
SELECT d.Result, MatchRatio = CAST(CASE
WHEN d.Result = 1 THEN 100
WHEN d.Result = 3 THEN DATALENGTH(@Target)*100.00/DATALENGTH(@Reference)
WHEN d.Result...
July 31, 2012 at 3:29 am
Abu Dina (7/31/2012)
Msg 156, Level 15, State 1, Procedure FuzzyMatch_iTVF, Line 22
Incorrect syntax...
July 31, 2012 at 3:13 am
Gazareth (7/30/2012)
ChrisM@Work (7/30/2012)
Douglas P. (7/30/2012)
I have:----------------------January-February-March
GB------London------200------100------120
France--Paris--------300------212------213
And I want to have:
----------------------January-February-March-Difference
GB------London------200------100------120------20
France--Paris--------300------212------213------1
The query you posted above doesn't generate more than one month. Where do the two extra months...
July 30, 2012 at 9:11 am
That's very kind Paul but I'm just a jobbing TSQL developer! Thanks anyway.
July 30, 2012 at 9:03 am
Douglas P. (7/30/2012)
I have:----------------------January-February-March
GB------London------200------100------120
France--Paris--------300------212------213
And I want to have:
----------------------January-February-March-Difference
GB------London------200------100------120------20
France--Paris--------300------212------213------1
The query you posted above doesn't generate more than one month. Where do the two extra months come from...
July 30, 2012 at 9:01 am
So your report currently displays only one month's worth of data?
July 30, 2012 at 8:35 am
Hi Paul, thanks for the plan.
Points:
1. No clustered indexes on any of the 4 tables, a suitable clustered index on DeltaFAKT_DETAIL would probably help the expensive SORT in the...
July 30, 2012 at 8:33 am
Douglas P. (7/30/2012)
SQL query which provides data looks...
July 30, 2012 at 7:28 am
GilaMonster (7/30/2012)
July 30, 2012 at 7:21 am
SELECT January, February, March, Difference = March - February
FROM ...
July 30, 2012 at 7:19 am
Hi Paul, can you post the Actual plan please, rather than the estimated plan? There are often differences between the two - for instance, the estimated plan you've just posted...
July 30, 2012 at 5:44 am
Viewing 15 posts - 5,971 through 5,985 (of 10,144 total)