Viewing 15 posts - 2,791 through 2,805 (of 3,957 total)
ChrisM@Work (9/17/2012)
Lynn Pettis (9/17/2012)
Start here: http://msdn.microsoft.com/en-us/library/ms177410(v=sql.90).aspxWhen you've read through that, read this excellent alternative by Dwain Camps[/url].
I wouldn't exactly call it mine (:blush:) as the initial links in the article...
September 17, 2012 at 10:08 pm
achtro (9/17/2012)
thanks dwain that was very helpful and the query you provided is perfect for my scenario that i mentioned.
You are most welcome. As I said above, it turns...
September 17, 2012 at 8:16 pm
My first thought, like ChrisM@Work was to use a rCTE for this, showing as always that great minds think alike! π
So, to be different, we'll propose a QU approach, which...
September 17, 2012 at 8:06 pm
For a working solution, you'll need to give us a little more:
1. DDL to CREATE a table
2. Consumable sample data (INSERT/SELECT/UNION ALL SELECT), and
3. A little more information on how...
September 17, 2012 at 7:21 pm
One point that is worthy of note. While the rCTE nTuples solutions didn't make the winners cut here, it does have advantages in certain cases.
It loses because it generates...
September 17, 2012 at 6:33 pm
PiManΓ© (9/17/2012)
The query doesn't differentiate a "normal" index column from an "include" index column...
In following statements idx_dupIndexes_03 and idx_dupIndexes_06 are considered duplicate but they're not.
CREATE TABLE dupIndexes (id1 INT, id2...
September 17, 2012 at 6:25 pm
Forgive my innocent question here but why a FUNCTION at all?
Just replace:
HOST0140.NAME
with:
NAME=RIGHT(HOST0140.NAME, LEN(HOST0140.NAME)-(1+CHARINDEX(', ', HOST0140.NAME))) + ' ' +
LEFT(HOST0140.NAME, CHARINDEX(', ', HOST0140.NAME) - 1)
September 17, 2012 at 3:15 am
I think that there are probably faster and better ways, but I think this is one way:
;WITH IndexColumns AS (
SELECT DISTINCT a.object_id,...
September 16, 2012 at 7:34 pm
How about something like this?
;WITH PriorQueryResults AS (
SELECT Table_Name='Project Phase', [Lookup Table Value]= 'Build'
UNION...
September 16, 2012 at 6:50 pm
Cadavre - Cool idea! Here's a terser version of yours:
;WITH MyNums AS (
SELECT num=a.num + 10*b.num + 100*c.num + 1000*d.num + 10000*e.num + 100000*f.num
FROM (VALUES (1),(2),(5),(7),(8),(9)) a (num)
CROSS APPLY...
September 14, 2012 at 7:29 am
And here's one specially built for ChrisM@Work, who loves cascading CROSS APPLYs:
;WITH SourceNums AS (
SELECT num FROM (VALUES (1),(2),(5),(7),(8),(9)) a (num)
), MyNums AS (
SELECT num=a.num + 10*b.num + 100*c.num +...
September 13, 2012 at 9:53 pm
Eugene Elutin (9/13/2012)
dwain.c (9/12/2012)
Here's a version of the Tuples solution that runs in about 1/3 the time:...
I like this one, as it's very different approach, but yeah it's still much...
September 13, 2012 at 9:13 pm
Sean Lange (9/13/2012)
dwain.c (9/13/2012)
Sean Lange (9/13/2012)
...some guy on the internetI think I'll change my board name. π
LOL by no means was any disrespect intended good sir. π I of course...
September 13, 2012 at 7:32 pm
The DDL you posted doesn't seem to fully match your second post's query.
I suggest you post complete DDL and sample data in a readily consumable format (i.e., INSERT/SELECTs) that can...
September 13, 2012 at 7:29 pm
Sean Lange (9/13/2012)
...some guy on the internet
I think I'll change my board name. π
September 13, 2012 at 6:50 pm
Viewing 15 posts - 2,791 through 2,805 (of 3,957 total)