Viewing 15 posts - 9,841 through 9,855 (of 18,926 total)
Why not clean the data and make sure it stays clean forever, then simply doing a single join?
May 18, 2007 at 5:29 pm
You need to return the max row per id from table b in a derived table and then join that to table A. I would give more details but it's...
May 18, 2007 at 9:56 am
It will work without the ", 'U'", since the name of the objects must be unique to a single owner, then there's no point in having to specify the object...
May 17, 2007 at 9:16 pm
Option b is to insert the results of this query into a table variable or temp table, then do the self join there.
May 17, 2007 at 3:47 pm
He y jeff,can you repost your list of valid points, I'd like to read them now that our homework is over!
May 17, 2007 at 6:36 am
Hence my more complicated / advanced t-sql solution
.
May 17, 2007 at 6:02 am
Ya even better, use a single in statement. Learn something new every day
.
May 17, 2007 at 5:59 am
In a procedure :
CREATE TABLE #tmp (ID INT NOT NULL IDENTITY(1,1) PRIMARY KEY CLUSTERED, DesignationName VARCHAR(100), Description VARCHAR(1000))
INSERT INTO #tmp (DesignationName, Description)
SELECT DesignationName, Description FROM dbo.YourBaseTable ORDER BY ?
--the...
May 17, 2007 at 5:57 am
Dpends on the queries you build. Many of the system views join many tables, many times even in some cases. So if you can avoid that and do a clustered...
May 17, 2007 at 5:49 am
We need the table definition, sample data, the required output from that sample data. We also need to know what you define as the middle rows.
And knowing for which cool...
May 17, 2007 at 4:42 am
Nope, you pretty much just answered your own question. I'm sure that there are other factors to consider in the equation but it looks like you got the key ones...
May 17, 2007 at 4:40 am
In the 2nd plan, I guess that the computing is done previously to the query and that it doesn't need to be redone afterwards.
But that's still and interesting point!
May 16, 2007 at 2:27 pm
Here's a question : What happens if during that select, the @@identity value is changed by another process? Does the plan consider it to be a scalar value that will never...
May 16, 2007 at 2:07 pm
Viewing 15 posts - 9,841 through 9,855 (of 18,926 total)