Viewing 15 posts - 946 through 960 (of 1,170 total)
I came up to the following, based on your logic
select t2.mytab2col1,t1.mytab1col1
from ##Temp2 t2
join ##Temp1 t1 on
((t2.mytab2col2 != t1.mytab1col2) and (t2.mytab2col3 = t1.mytab1col3))
or ((t2.mytab2col2 = t1.mytab1col2) and (t2.mytab2col3...
April 25, 2013 at 5:14 am
I came up to the following, based on your logic
select t2.mytab2col1,t1.mytab1col1
from ##Temp2 t2
join ##Temp1 t1 on
((t2.mytab2col2 != t1.mytab1col2) and (t2.mytab2col3 = t1.mytab1col3))
or ((t2.mytab2col2 = t1.mytab1col2) and (t2.mytab2col3...
April 25, 2013 at 5:10 am
iam777here4u (4/25/2013)
April 25, 2013 at 4:00 am
Maybe you should do a little work around.
What about this?
select t1.mytab1col1,t2.mytab1col1
from ##Temp1 t1 left join ##Temp2 t2 on t1.mytab1col2=t2.mytab1col2
and t1.mytab1col3=t2.mytab1col3 and t1.mytab1col1 != t2.mytab1col1
group by t1.mytab1col1,t2.mytab1col1
order by t1.mytab1col1 asc
April 25, 2013 at 3:47 am
Hi
Simply use EXCEPT.
The following
select col1,col2,...,colN from table1
EXCEPT
select col1,col2,...,colN from table2
will give you the different rows.
Another option is to use some tool for data/base comparison
Regards
IgorMi
April 25, 2013 at 3:08 am
lianvh 89542 (4/25/2013)
I noticed that DBCC dbreindex is still available in 2008R2 . Wehn we run this utility to rebuild PK Custered COnstraints, the Constraints are not droppedd/disbled and...
April 25, 2013 at 3:03 am
IgorMi (4/25/2013)
m.rajesh.uk (4/25/2013)
I found there was fragmentation in my server and i rebuild the indexes to remove fragmentation. But even after rebuilding...
April 25, 2013 at 2:33 am
sufiyan.sarguroh (6/8/2012)
And does the index rebuild/reorg reduce internal frag too ?
Yes it does.
Regards
IgorMi
April 25, 2013 at 2:13 am
m.rajesh.uk (4/25/2013)
I found there was fragmentation in my server and i rebuild the indexes to remove fragmentation. But even after rebuilding the...
April 25, 2013 at 1:53 am
Hi
Yes, an index can have WHERE clause, starting from sql server 2008 and upper versions (http://technet.microsoft.com/en-us/library/cc280372.aspx).
Regards
IgorMi
April 24, 2013 at 8:05 am
That was stale statistics resulting in a sub-optimal exec plan (probably estimating one row and getting thousands or millions). Next time just update stats, don't waste time doing a full...
April 22, 2013 at 1:57 am
Hi
From your results it seems you have much schema locks.
Just had similar scenario yesterday, without locks but with high cpu. Some update scripts were running for 'forever'. We stopped them,...
April 21, 2013 at 2:18 pm
Hi,
Interesting.
It may be your log file? Is it on same or different RAID and on what type? It's recommended to be on separate and faster disks.
It may be your tempdb?...
April 21, 2013 at 2:10 pm
Viewing 15 posts - 946 through 960 (of 1,170 total)