Viewing 15 posts - 1 through 15 (of 15 total)
David Burrows (4/25/2014)
SELECT
'Type'[Type]
,SUM(CASE WHEN code='09' THEN Amt/100 ELSE 0 END) AS [Col1]
,SUM(CASE WHEN code='10' THEN Amt/100 ELSE 0 END) AS [Col2]
,SUM(CASE WHEN code='11' THEN Amt/100 ELSE...
April 25, 2014 at 7:31 pm
Stuart Davies (4/25/2014)
Irrespective of which solution you use, test it on your system. All of the solutions work against the 10 or so rows provided, but what's...
April 25, 2014 at 6:57 am
Hi Thava,
Thanks for sharing your thoughts on this query. I will try this one.
April 25, 2014 at 6:40 am
pmadhavapeddi22 (4/25/2014)
SELECT 'Type' Type
, col1 = [09]
, col2 = [10]
...
April 25, 2014 at 6:39 am
Hi Stuart,
Thanks for your solution. I will try and study this one.
April 25, 2014 at 6:37 am
Hello Stuart,
Thanks for you reply.
I apologize for posting a query that does not follow the standards.
Anyway, here it is again.
I have this example table
CREATE TABLE TEST(
Code nvarchar (2),
Amt numeric(18,...
April 25, 2014 at 2:37 am
select
sum(case when loan.amount < 15000 then 1 else 0 end) as criteria1_count,
sum(case when loan.amount < 15000 then loan.amount else 0 end) as criteria1_amount,
...
May 15, 2009 at 12:27 am
Bob Hovious (5/13/2009)
select
sum(case when amount < 15000 then 1 else 0 end) as criteria1_count,
sum(case when amount 15000 and terms ...
May 14, 2009 at 11:08 pm
Thanks for the info Bob. I will try to search it here in the forum.
May 14, 2009 at 7:05 pm
Bob Hovious (5/13/2009)
1. Cut-and-Paste from Sql Server Management Studio (SSMS)
2. Using the "RESULTS to FILE" option in SSMS
3. Using Sql Server Integration Services
4. ...
May 14, 2009 at 7:50 am
Great! Thanks Bob...
Now, how am I going to export the result to an excel file? 🙂
May 13, 2009 at 10:29 am
Thanks for your reply.
I want to total the amount as well as count the number of records that falls to the criteria.
May 13, 2009 at 9:48 am
Jack Corbett (2/6/2009)
February 6, 2009 at 6:03 pm
Im a newbie to T-SQL and a little programming knowledge. What can you suggest? Do you have a sample script just to give me an idea on how to start...
February 6, 2009 at 7:11 am
Jack Corbett (2/6/2009)
Sounds like something you should be doing within Excel with VBA, so an Excel site may be a better place to ask the question.
Actually Im not. Maybe my...
February 6, 2009 at 6:55 am
Viewing 15 posts - 1 through 15 (of 15 total)