Viewing 15 posts - 136 through 150 (of 237 total)
Hi Dwain,
Your workout was really helpful and of course i will be switching to your sample as there is no need of temp tables to hold the data. I was...
January 26, 2015 at 5:19 am
Finally Quick update,
My assumption helped me little.
I ran dwain's sugestion on my production box and it ran in 10 sec.
Tried my logic as well and it took 11 sec.
The reason...
January 25, 2015 at 6:47 pm
Hi Dwain,
Thanks a lot for the reply and shortening the logic. Forgot to mention about Isprocessed is not null column only. So i removed the coalesce.
But when i execute the...
January 25, 2015 at 6:32 pm
Hi Jeff,
Quick Update,
I remove using the temp variable and used temp table instead. It took 31 seconds. Do you have any suggestion to spreed up still?
my latest try,
Declare @CompID...
January 25, 2015 at 2:20 pm
Hi Jeff,
thanks for your reply.
I don't know what has happened. Initially it took 23 minutes. but now 500k took 54 seconds. Is thee any way to improve this please.
January 25, 2015 at 1:13 pm
thank you jeff,
from your comments, on what column should i need to create index?
Also, the requirement is, i have a process which runs once in a month and takes records...
January 25, 2015 at 10:44 am
Hi Dwain,
Thanks for your reply and i didn't explain whole concept of my requirement. i just mentioned the requirement where the technical task comes into picture. Currently it is doing...
January 21, 2015 at 5:53 am
Sorry Gentleman, am little confused.
I am not updating the UserId. i am just updating the Amount and always the amount will not be same because this process will update the...
January 20, 2015 at 2:58 pm
Thanks sean, in that case i am updating the amount. can both the syntax below results same?
OUTPUT INSERTED.UserId
OUTPUT Deleted.UserId
January 20, 2015 at 2:45 pm
Understood and thanks for your suggestion. What would happen If i use OUTPUT.inserted UserId instead of OUTPUT.deleted UserId
January 20, 2015 at 2:32 pm
In my post i didn't mention about transaction and having try catch block. I am already having that. Didn't include inmy post. So no worries on that piece.
One more question,...
January 20, 2015 at 2:24 pm
Thanks guys for the response. Have a question about,
will OUTPUT Inserted.UserId doesn't fit for this requirement? In my previous post, i am using this.
January 20, 2015 at 2:18 pm
Below is my try,
DECLARE @Affected TABLE (UserId INT);
WITH data
AS (
SELECT UserId
,ProcessingAmout = SUM(COALESCE(Amount, 0))
FROM @tblCompanyProess
WHERE IsProcessed = 0
)
UPDATE @UserBalance
SET UserAmountBalance = COALESCE(B.UserAmountBalance, 0) + D.ProcessingAmout
OUTPUT INSERTED.IdMember
INTO @Affected(IDMember)
FROM @UserBalance UB
INNER JOIN...
January 20, 2015 at 1:24 pm
Viewing 15 posts - 136 through 150 (of 237 total)