Viewing 15 posts - 151 through 165 (of 311 total)
Paul White NZ (4/6/2010)
April 6, 2010 at 3:43 pm
IIRC you need to do some thing like the following in order to let the startup filter work properly:
And (
@bOnlyUnmatched = 0 --...
March 24, 2010 at 9:50 am
Interesting, again I learned something new today. Thanks for the reply.
Peter
March 23, 2010 at 5:45 pm
The Dixie Flatline (3/23/2010)
I see what you mean, but my point wasn't the selection/omission criteria in the where clause.
But that's what the thread was about. The same issue was raised...
March 23, 2010 at 5:16 pm
If he's in NZ, Code I'd written at that time of the morning (I'm in Australia) wouldn't have worked either!
Paul made a mistake based on an improper data set. Even...
March 23, 2010 at 4:21 pm
...substring(@input,N,1) between '0' and '9' ...
Still the same mistake. This will match characters like '³' and '²'.
March 23, 2010 at 3:22 pm
If you are looking for performance I should try Paul's solution as well, with a minor change (replace COUNT(*) with COUNT(DISTINCT name)). Given the small test data set and no...
March 23, 2010 at 2:59 pm
lmu92 (3/23/2010)
Thanx for clarification, Peter!I knew there must have been a reason Lowell provided a method that seemed to leave room for improvement... :blush:
Well, you were close. I think this...
March 23, 2010 at 2:18 pm
lmu92 (3/23/2010)
CASE
WHEN (SUBSTRING(@OriginalText,Tally.N,1)) like '[0-Z]'
THEN SUBSTRING(@OriginalText,Tally.N,1)
ELSE '' END
It...
March 23, 2010 at 1:37 pm
And the modified version returns NULL
March 23, 2010 at 9:39 am
Hi Paul, as you just mentioned in another thread, "Never use a UNION where a UNION ALL will do"! I believe the test script contains an error because the comments...
March 23, 2010 at 9:36 am
Another way to get rid of the sort is to make all values the same in Tens(n):
Tens (N) AS (SELECT 0 UNION ALL SELECT 0 UNION...
March 23, 2010 at 9:00 am
I guess the subtal difference between Wayne's and Paul's solution is the (ORDER BY N) vs. (ORDER BY (SELECT 0)). The last one doesn't require a sort. Check out the...
March 23, 2010 at 8:45 am
select
@date = max(obj.date)
from
@Table2 obj
join
@Table1 t1 on t1.date = obj.date and t1.name = 'John'
join
@Table1 t2 on t2.date = obj.date and...
March 23, 2010 at 7:49 am
Note that variable names @, @@ or names starting with @@ are deprecated in SQL 2008. See http://msdn.microsoft.com/en-us/library/ms143729.aspx:
Do not use @ or @@ or names that begin with @@ as...
March 23, 2010 at 3:13 am
Viewing 15 posts - 151 through 165 (of 311 total)