Viewing 15 posts - 2,446 through 2,460 (of 2,647 total)
What if you use the crosstab in a CTE, then do a final sum(case...) in the select statement. Here's a start without all of the logic, but I think...
October 10, 2011 at 8:28 am
Look at this article http://www.sqlteam.com/article/using-cross-apply-in-sql-server-2005
Let me know if this helps 🙂
Thanks,
Jared
October 7, 2011 at 7:46 am
Well... I think the best way may be to create a table based function that looks at the raw data and use CROSS APPLY to bring your counts.
Thanks,
Jared
October 7, 2011 at 6:54 am
Try this for now. I would leave the data in a raw form, and then group on things in the report itself if you are making a SSRS report....
October 6, 2011 at 2:13 pm
Here's where I am at... I will keep going as I love this kind of stuff! 🙂
SELECT InvoiceNumber, YEAR(InvoiceDate) AS InvoiceYear, MONTH(InvoiceDate) AS InvoiceMonth, InvoiceDate, PaidDate,
DATEADD(D,45, InvoiceDate) Date45Days, IsPaid,
CASE IsPaid...
October 6, 2011 at 1:40 pm
Can you please give me a sample of what you want your aging report to look like? In terms of relevant data points for your purpose.
EDIT: Also, are you just...
October 6, 2011 at 1:28 pm
I created invoices for my last company where we were a net 30 and some people had paid a %age POS, some had balances at 30, 60, 90, and 120+...
October 6, 2011 at 1:16 pm
However, the "simplest" way with your current SP is to put the 2 sets into temp tables, then insert the data from the 2 temp tables into your 2 physical...
October 6, 2011 at 1:11 pm
It would help if we could see the stored procedure.
Thanks,
Jared
October 6, 2011 at 1:06 pm
Restore without "Preserve the Replication Settings" being checked and you should be fine.
Thanks,
Jared
October 6, 2011 at 10:01 am
Try making your 100 100.0
EDIT: You are working with integers, meaning the result will be an integer. If you make one of the numbers a decimal, it will implicitly convert...
October 6, 2011 at 9:58 am
Paul Bradshaw (10/4/2011)
DECLARE @file sysname
SELECT...
October 6, 2011 at 8:10 am
Just a thought... You mentioned taking it offline and detaching, etc. Do you have the opportunity to restart SQL Server? Not sure if it will help, but I have seen...
October 6, 2011 at 8:07 am
GilaMonster (10/5/2011)
http://channel9.msdn.com/Events/TechEd/NorthAmerica/2011/WCL405
http://channel9.msdn.com/Events/TechEd/NorthAmerica/2011/WCL406
They probably need watching...
October 5, 2011 at 3:50 pm
Sqlchicken (10/5/2011)
jared-709193 (10/5/2011)
mendesm (10/5/2011)
October 5, 2011 at 3:49 pm
Viewing 15 posts - 2,446 through 2,460 (of 2,647 total)