Viewing 15 posts - 3,391 through 3,405 (of 15,381 total)
KGJ-Dev (1/20/2015)
Understood and thanks for your suggestion. What would happen If i use OUTPUT.inserted UserId instead of OUTPUT.deleted UserId
In an UPDATE or DELETE statement you would get the value...
January 20, 2015 at 2:36 pm
If Steve's guess is correct this is a basic SUM with GROUP BY.
January 20, 2015 at 2:34 pm
tino.lopez (1/20/2015)
I posted the original data in data example.xls as an attachment.
Right but we don't know what you want for output and the data is not consumable. It is much...
January 20, 2015 at 2:32 pm
KGJ-Dev (1/20/2015)
One more...
January 20, 2015 at 2:29 pm
Stephanie Giovannini (1/20/2015)
SET XACT_ABORT ON;
BEGIN TRAN;
with cte as
(
select userid, SUM(Amount) sumAmount
...
January 20, 2015 at 2:19 pm
tino.lopez (1/20/2015)
Thank you for the advice and pointers. Much appreciated! I am receiving the error attached.
that's because the code I posted was missing an alias. I don't have anything to...
January 20, 2015 at 1:37 pm
Hi and welcome to SSC! It is not exactly clear what you are trying to do. I would recommend you don't need to load mountains of test data, just enough...
January 20, 2015 at 1:19 pm
SQL Guy 1 (1/20/2015)
You can create a daily/hourly/minutely job that queries sys.databases join sys.sysprocesses and inserts results into a some table, and run it for a while.
Could also add...
January 20, 2015 at 1:07 pm
KGJ-Dev (1/20/2015)
thanks for the reply and my bad. updated the data on my original post two process happening
1. Updating the balance on the table @UserBalance
2. Making the...
January 20, 2015 at 1:06 pm
You just need to further simplify your case expression. You should replace the whole case expression with this:
SUM(ISNULL(a.exposure_amt, a.bond_amt) * i.exchange_rate) AS 'Rolling 12 Month Company Exposure'
This has the added...
January 20, 2015 at 1:04 pm
Awesome job with ddl and sample data. The problem here is that your desired output is exactly the same as the data you start with.
January 20, 2015 at 12:42 pm
jim.metcalf1974 (1/20/2015)
I am trying to figure out which db's are actively used.
is there a way for me to see in...
January 20, 2015 at 12:38 pm
scottthompson (1/20/2015)
January 20, 2015 at 12:36 pm
Ed Wagner (1/20/2015)
Brandie Tarvin (1/20/2015)
Sean Lange (1/20/2015)
January 20, 2015 at 12:20 pm
Eric M Russell (1/20/2015)
Sean Lange (1/20/2015)
Eric M Russell (1/20/2015)
January 20, 2015 at 9:57 am
Viewing 15 posts - 3,391 through 3,405 (of 15,381 total)