Viewing 15 posts - 4,831 through 4,845 (of 8,731 total)
I'm not sure if you have explored this option or if it would be any better of what you've already got.
IF OBJECT_ID('tempdb..#Files') IS NOT NULL DROP TABLE #Files;
CREATE TABLE #Files(...
June 12, 2015 at 9:15 am
drew.allen (6/11/2015)
Luis Cazares (6/11/2015)
koles2004 (6/11/2015)
I wanna specify: the second your variant is faster than first ?
I can't assure that it's faster or better. The only way to ensure that is...
June 11, 2015 at 2:40 pm
koles2004 (6/11/2015)
Both variants are right for my task )I like more my variant and your first variant.
Your second variant i dont like )
Any reason to that?
June 11, 2015 at 1:56 pm
koles2004 (6/11/2015)
I wanna specify: the second your variant is faster than first ?
I can't assure that it's faster or better. The only way to ensure that is by testing over...
June 11, 2015 at 1:48 pm
Change the tables so they can be temp tables https://technet.microsoft.com/en-us/library/ms177399(v=sql.105).aspx
Or table variables.
June 11, 2015 at 1:31 pm
I'm giving an example on how you should post your data. As you see, the code can be copied and ran without any major effort.
I'm including a possible solution with...
June 11, 2015 at 1:03 pm
I would encourage you to change the way you write JOINs. That syntax is the old way and can become confusing with more complex queries and develop into unwanted cartesian...
June 11, 2015 at 12:39 pm
Some basic things here, probably we're missing something.
Your declaration of the cursor uses 1 variable and you only use the column on that variable within the cursor.
Basically, your code should...
June 11, 2015 at 11:01 am
Do you mind if I join the party?
SELECT n.NewsId
FROM #NewsEntities n
WHERE EntityId = 1
EXCEPT
SELECT n.NewsId
FROM #NewsEntities n
WHERE EntityId = 2
June 11, 2015 at 9:01 am
Gail Shaw has a series of articles on her blog where she tests this options. This specific test is done here: http://sqlinthewild.co.za/index.php/2010/03/23/left-outer-join-vs-not-exists/
However, I would insist on following Phil's advice on...
June 11, 2015 at 8:51 am
doug.davidson (6/11/2015)
Iwas Bornready (6/11/2015)
I knew it would error with some kind of overflow error but I don't have all the error codes memorized.
+1
Figured it out by elimination:
1000 - wrong
220 -...
June 11, 2015 at 8:46 am
Change the SELECT * to specify all the columns needed and generated after the pivot. Change the ISNULL to those columns.
June 9, 2015 at 9:53 am
Or you could read the following article and learn how to do it yourself, either with pivot or cross tabs.
June 4, 2015 at 2:08 pm
Ed Wagner (6/4/2015)
rodjkidd (6/4/2015)
Lynn Pettis (6/4/2015)
Alvin Ramard (6/4/2015)
Jeff Moden (6/4/2015)
Have any of you ever used a CTP of SQL Server to power your real production databases? ...
June 4, 2015 at 12:33 pm
It might not relate to the question directly, but if the number will be stored, this could be an alternative.
CREATE TABLE #Increments(
id5 int IDENTITY(5,5),
...
June 4, 2015 at 11:25 am
Viewing 15 posts - 4,831 through 4,845 (of 8,731 total)