Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Dividing Values in a Table

Author  Topic 

sqlfrankfurt
Starting Member

3 Posts

Posted - 2009-07-01 : 06:42:57
since I ma having only little experienc ewith SQL I need to aks a question:

I have a data source with Roomnights and Departure Month. In RB 2.0 I have created a table showing roomnights for 2008 and 2009 in a column each. In a 3rd column I want to know what the difference between 2009 and 2008 is. But, i can only add totals.

Any ideas on how solve this problem in SQL server 3008 reportbuidler 2.0?

Lamprey
Master Smack Fu Yak Hacker

4614 Posts

Posted - 2009-07-01 : 11:50:28
I think we need more detail before we can help, follow this link to help post your question:
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Does your tables have one row each or??

This might help??
SELECT (SELECT RoomNights FROM Table2008) - (SELEC RoomNights FROM Table2009) AS RoomDiff
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-07-01 : 12:04:57
you can simply use

=ReportItems!Textbox1.value-ReportItems!Textbox2.value
as expression for third cell provided textbox1 contains 2008 total and textbox2 2009 total.
Go to Top of Page
   

- Advertisement -