Viewing 15 posts - 1,066 through 1,080 (of 4,081 total)
However, my real reason for posting was to point out the true complexity of coding a CASE based solution with a large number of columns vs. the simplicity of coding...
June 22, 2011 at 6:59 am
Michael, if I may, you are being nit-picky at this point. 😛 Let's not assume the columns hold INT values. ...
June 21, 2011 at 4:55 pm
Are you looking for something more like this?
declare @sample table (column1 int, column2 int)
declare @work table (col2 int primary key)
insert into @sample
select 123, 888 union all
select 123, 999 union all
select...
June 21, 2011 at 4:43 pm
Good point about the null columns. I hadn't thought about that.
I believe this fixes it though. Not too ugly and still gets the job...
June 21, 2011 at 2:43 pm
declare @sample table (column1 int, column2 int)
insert into @sample
select 123, 888 union all
select 123, 999 union all
select 123, 888 union all
select 456, 777
select *
from @sample
where column1 in (select column1...
June 21, 2011 at 2:01 pm
Scott, will you clarify what you think won't work on 2005? The last thing I posted works just fine on a 2005 instance.
By the way, there are...
June 21, 2011 at 12:57 pm
declare @sample table (Item varchar(20), Code varchar(20))
insert into @sample
Select 'Item1' ,'CodeA' union all
Select 'Item1' ,'CodeB' union all
Select 'Item1' ,'CodeC' union all
Select 'Item2' ,'CodeA' union all
Select 'Item2' ,'CodeB' union all
Select 'Item3'...
June 21, 2011 at 8:26 am
Use LEFT OUTER JOIN whenever you want to see rows in the primary table, whether or not matching rows exist in the joined table. INNER JOIN...
June 20, 2011 at 1:39 pm
No rush, but thank you for replying.
June 20, 2011 at 12:59 pm
Let me echo OPC.THREE's request.
What he is asking for are the statements to create sample tables and populate them with sample data. ...
June 20, 2011 at 9:31 am
Where did you include the index schema?
June 20, 2011 at 8:17 am
seek also is taking time because it has to retrive many rows
You've just stated the heart of the problem.
A seek can just mean that the query...
June 19, 2011 at 8:53 pm
GilaMonster (6/17/2011)
Anyone got a magic wand? http://www.sqlservercentral.com/Forums/FindPost1127588.aspx
Solid State hard drives?
June 17, 2011 at 1:42 pm
No argument, Gail. They don't have the index structure in place for a merge join.
I'm just saying that even a hash match can only run so fast.
June 17, 2011 at 8:49 am
Just looked at the last execution plan. Even though your index seeks limit the number of rows from your two tables, you are still joining almost 400,000...
June 17, 2011 at 8:28 am
Viewing 15 posts - 1,066 through 1,080 (of 4,081 total)