Viewing 15 posts - 481 through 495 (of 3,348 total)
With the liberal use of NOLOCK, it is quite likely that this query will return incorrect results. Make sure the query does what it should do first, then worry about...
April 15, 2016 at 12:07 pm
Grumpy DBA (4/15/2016)
crookj (4/15/2016)
Revenant (4/15/2016)
Ed Wagner (4/15/2016)
ShipwreckExxon
spill
Drunk
Scotch
April 15, 2016 at 11:58 am
Manic Star (4/15/2016)
djj (4/15/2016)
Grumpy DBA (4/15/2016)
jeff.mason (4/15/2016)
HoulihanHooligan
Mischief
Managed
Wrecked
April 15, 2016 at 10:26 am
Sgar... (4/15/2016)
In above examples you have used Set @dbname= 'database name'.I am taking this input from Stored procedure input. How can you help?
In that case you do not need the...
April 15, 2016 at 10:20 am
Sergiy (4/14/2016)
And you can safely removeleft join
dbo.Table3 t3 on t1.Code3 = t3.Code3 and
t3.Code4 = 1
left-joined table is not gonna affect COUNT(*) in any way.
Woah, careful there!
This statement is...
April 15, 2016 at 10:11 am
TheSQLGuru (4/15/2016)
April 15, 2016 at 10:00 am
Kazmerelda (4/15/2016)
Hugo, can I ask what was sloppy about my code?
Heh! Gail (Gilamonster) pointed out way more things than i would have. Truth is, I never inspected the entire query,...
April 15, 2016 at 9:57 am
Can you post the execution plans for the query on the two servers? (Actual plan, please, not the estimated - after running with the option to include the actual execution...
April 15, 2016 at 9:50 am
Aaawwww, I lost the 50/50.
#NeverLucky :rolleyes:
April 15, 2016 at 2:46 am
Ed Wagner (4/14/2016)
crookj (4/14/2016)
DonlSimpson (4/14/2016)
Ed Wagner (4/14/2016)
Manic Star (4/14/2016)
Ed Wagner (4/14/2016)
djj (4/14/2016)
Grumpy DBA (4/14/2016)
ThomasRushton (4/14/2016)
djj (4/14/2016)
EarthquakeVolcano
Hurricane
Wind
Tornado
Wizard
Potter
Putter
dilly-dally
Delay
Train
April 14, 2016 at 12:30 pm
Ed Wagner (4/14/2016)
SQLRNNR (4/14/2016)
Luis Cazares (4/14/2016)
Is this guy for real?How is it possible that he can't work out a basic DML statement and still have a job?
Hopefully Hugo has him...
April 14, 2016 at 12:28 pm
Iwas Bornready (4/14/2016)
psingla (2/2/2015)
Good Question...That's why I prefer using count(1)
I use COUNT(0). Any difference?
No.
The COUNT function has officially two forms. The first is COUNT(*) which self-documents that it counts rows...
April 14, 2016 at 12:23 pm
CASE WHEN MONTH(YourDate) <> MONTH(DATEADD(day, 1, YourDate)) THEN 'True' ELSE 'False' END
April 14, 2016 at 10:53 am
From database design/normalization point of view, all ideas are okay. Multiple attributes that depend on the same key can be combined in a single table or spread out over multiple...
April 14, 2016 at 10:49 am
In some specific situations, heaps offer some performance benefits over clustered indexes. One example is avoiding page splits for tables with lots of inserts and no updates. Another is that...
April 14, 2016 at 10:34 am
Viewing 15 posts - 481 through 495 (of 3,348 total)