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.
Author |
Topic |
jrosser
Starting Member
14 Posts |
Posted - 2009-02-19 : 09:10:12
|
I am creating an ASP.net app and I am trying to speed it up by doing the grouping in the server.Example:Create view Branch_Sales asSelect branch_id,sum(sales),sum(cost)from sales_cubegroup by branch_idSo if someone wanted to see sales by branch I would use this view, the problem is if I want to pass a Where Clause such as invoice_date. Invoice_date is a field in Sales_Cube but it is not in the View I created, so I get an error that invoice_date does not exist. I am wondering if there is some type of work around for this.Thank youJeremy |
|
X002548
Not Just a Number
15586 Posts |
|
jrosser
Starting Member
14 Posts |
Posted - 2009-02-19 : 09:33:05
|
I would have 2 text boxes where the user can set any date range, so I would need all dates. I guess doing a join is the only way to do that.I will give that a try.Jeremy |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-02-19 : 10:05:56
|
quote: Originally posted by jrosser I am creating an ASP.net app and I am trying to speed it up by doing the grouping in the server.Example:Create view Branch_Sales asSelect branch_id,sum(sales),sum(cost)from sales_cubegroup by branch_idSo if someone wanted to see sales by branch I would use this view, the problem is if I want to pass a Where Clause such as invoice_date. Invoice_date is a field in Sales_Cube but it is not in the View I created, so I get an error that invoice_date does not exist. I am wondering if there is some type of work around for this.Thank youJeremy
if date filed is not in cube, you need to add it to view and then use it in where condition. |
|
|
|
|
|