Viewing 15 posts - 1,306 through 1,320 (of 1,957 total)
I suspect this bit of code in Query 2 is the reason:
and stcyt = '201110'
June 27, 2011 at 4:04 pm
Oh and while you are at it, you might want to apply the same approach to your other IN statements...
June 27, 2011 at 9:47 am
June 27, 2011 at 9:46 am
You can't put a list (2011, 2012) into an int!
If you want to select multiple years, you will need to look at changing your stored proc to accept a varchar...
June 27, 2011 at 9:22 am
Ninja's_RGR'us (6/27/2011)
mister.magoo (6/27/2011)
Ninja's_RGR'us (6/27/2011)
mister.magoo (6/27/2011)And the same thing re-written using a CTE - just to show an alternate way to format the code:
;WITH ToDelete AS
(
...
June 27, 2011 at 8:01 am
Ninja's_RGR'us (6/27/2011)
mister.magoo (6/27/2011)And the same thing re-written using a CTE - just to show an alternate way to format the code:
;WITH ToDelete AS
(
...
June 27, 2011 at 7:55 am
SQLkiwi (6/26/2011)
DELETE TOP (9) @t
Though in practice you're likely to see the same 9 rows deleted, it's just not guaranteed. To...
June 27, 2011 at 7:44 am
Do you have a backup that contains the problem table?
It would be worth restoring that somewhere to perform some more tests.
June 25, 2011 at 5:22 pm
I think standards are important, but this section made me giggle :
You get one and in a sentence. If you have more than that, or have an "or" or "but",...
June 25, 2011 at 2:09 am
How you cache it will depend on how much data there is.
You need to decide based on how much data there is to cache, how long you want to keep...
June 23, 2011 at 5:46 pm
Rich Yarger (6/22/2011)
Currently, I am using @SQL_ME_RICH, but I am wondering if someone has a better one for me!😛
P.S. Be nice!
How about @Cpu_Busy or @Rowcount ?
June 22, 2011 at 1:29 pm
It is because apple_id is valid, compare to this, which is equivalent:
CREATE TABLE #apples ( apple_id BIGINT )
CREATE TABLE #oranges ( orange_id BIGINT )
SELECT
*
FROM
...
June 21, 2011 at 11:19 am
Welsh Corgi (6/19/2011)
sqlfriends (6/19/2011)
So I think the script helps in some degree, but I still cannot decide if the former database is in use or not.
Have you tried what I...
June 19, 2011 at 7:05 pm
Actually, I think the backup will stop that being useful - sorry - I did say I wasn't an expert - I think I will step aside on this one...
June 19, 2011 at 7:04 pm
Do you mean you are executing this query many times per second/minute?
Are you using a connection pool? Is it possible that you are using up the connections in the pool,...
June 19, 2011 at 6:35 pm
Viewing 15 posts - 1,306 through 1,320 (of 1,957 total)