Showing posts with label view. Show all posts
Showing posts with label view. Show all posts

Monday, March 26, 2012

Refreshing data in GridView

Hi,

I’m new to SQL Express, but I have created a table and a stored proc to populate it.

I have dragged the table into a form so I can view the data in a GridView.

I have added a button to add new rows to the table.

All the above works fine, except when I hit add, the data gets added, but the GridView doesn’t update and show the new data. Is there some code I can add to the add button that also refreshed the GridView?

Thanks

Mike

You can use Response.Redirect(yourpage.aspx)|||There was a mistake above. That should be Response.Redirect("yourpage.aspx")sql

refresh view

Hello,
My problem is that I don't know how to refresh the view. Actually, what I
want to programaticaly do is something equivalant to presing the "run" butto
n
in the Enterprise manager.
A stored procedure that will do it, will also be good. But the only stored
procedure that I thought about is to drop the view and to create it again
(not a very elegant solution).
Do you know how I can solve this problem?
thanks!We could tell you, if you tell as the coding your using. "Refreshing" a view
means getting the data new, this differs in the languages.
HTH, Jens Suessmeyer.
"Liat" <Liat@.discussions.microsoft.com> schrieb im Newsbeitrag
news:83A7E9FC-9B15-4529-B49E-7EB2E27E4709@.microsoft.com...
> Hello,
> My problem is that I don't know how to refresh the view. Actually, what I
> want to programaticaly do is something equivalant to presing the "run"
> button
> in the Enterprise manager.
> A stored procedure that will do it, will also be good. But the only stored
> procedure that I thought about is to drop the view and to create it again
> (not a very elegant solution).
> Do you know how I can solve this problem?
> thanks!|||Liat
sp_refreshview stored procedure
"Liat" <Liat@.discussions.microsoft.com> wrote in message
news:83A7E9FC-9B15-4529-B49E-7EB2E27E4709@.microsoft.com...
> Hello,
> My problem is that I don't know how to refresh the view. Actually, what I
> want to programaticaly do is something equivalant to presing the "run"
button
> in the Enterprise manager.
> A stored procedure that will do it, will also be good. But the only stored
> procedure that I thought about is to drop the view and to create it again
> (not a very elegant solution).
> Do you know how I can solve this problem?
> thanks!|||I am using C++
"Jens Sü?meyer" wrote:

> We could tell you, if you tell as the coding your using. "Refreshing" a vi
ew
> means getting the data new, this differs in the languages.
> HTH, Jens Suessmeyer.
> "Liat" <Liat@.discussions.microsoft.com> schrieb im Newsbeitrag
> news:83A7E9FC-9B15-4529-B49E-7EB2E27E4709@.microsoft.com...
>
>|||Hi
View doesnt store any data. Selecting rows from a view is as good as
executing the query that created it.
We go for views because, it improves the performance of a query.
thanks and regards
Chandra
"Liat" wrote:

> Hello,
> My problem is that I don't know how to refresh the view. Actually, what I
> want to programaticaly do is something equivalant to presing the "run" but
ton
> in the Enterprise manager.
> A stored procedure that will do it, will also be good. But the only stored
> procedure that I thought about is to drop the view and to create it again
> (not a very elegant solution).
> Do you know how I can solve this problem?
> thanks!|||> We go for views because, it improves the performance of a query.
Unless you are talking about indexed views, I disagree.sql

Friday, March 23, 2012

Refresh cube after data changed?

After I created a cube in BI Studio, I added more data to the fact table, modified dimension table, and refreshed DSV. I got Refresh Data Source View message ‘No changes have been found’, but I didn’t see the data that I just added in from cube browser.

(Database connecting and database structure didn’t change)

My questions:

  1. Is refresh DSV only for database structure change?
  2. Which step I was missing for refreshing cube data?

Thanks in advance.

Yes, refreshing is to pull database structure changes into the DSV. To get the new data, "Process" the cube.

You'll find that MSAS provides a rich set of capabilities and abilities to update the data. For now, always do a "Full Process", until you get more comfortable with the technology. Depending on the size of your cube, plan on spending a little time learning about incremental processing and partitions. For anything other than small cubes, expect to define / manage partitions are part of the definitions. The impact on performance is dramatic.

|||Thank you very much Dave.

It is very helpful information.

Refresh cube after data changed?

After I created a cube in BI Studio, I added more data to

the fact table, modified dimension table, and refreshed DSV. I got Refresh Data

Source View message ‘No changes have been found’, but I didn’t see the data that

I just added in from cube browser.

(Database connecting and database structure didn’t change)

My questions:

  1. Is refresh

    DSV only for database structure change?

  2. Which

    step I was missing for refreshing cube data?

Thanks in advance.

Yes, refreshing is to pull database structure changes into the DSV. To get the new data, "Process" the cube.

You'll find that MSAS provides a rich set of capabilities and abilities to update the data. For now, always do a "Full Process", until you get more comfortable with the technology. Depending on the size of your cube, plan on spending a little time learning about incremental processing and partitions. For anything other than small cubes, expect to define / manage partitions are part of the definitions. The impact on performance is dramatic.

|||Thank you very much Dave.

It is very helpful information.

Refresh cube after data changed?

After I created a cube in BI Studio, I added more data to the fact table, modified dimension table, and refreshed DSV. I got Refresh Data Source View message ‘No changes have been found’, but I didn’t see the data that I just added in from cube browser.

(Database connecting and database structure didn’t change)

My questions:

  1. Is refresh DSV only for database structure change?
  2. Which step I was missing for refreshing cube data?

Thanks in advance.

Yes, refreshing is to pull database structure changes into the DSV. To get the new data, "Process" the cube.

You'll find that MSAS provides a rich set of capabilities and abilities to update the data. For now, always do a "Full Process", until you get more comfortable with the technology. Depending on the size of your cube, plan on spending a little time learning about incremental processing and partitions. For anything other than small cubes, expect to define / manage partitions are part of the definitions. The impact on performance is dramatic.

|||Thank you very much Dave.

It is very helpful information.

Wednesday, March 21, 2012

Referensing an alias field within the same view

I have created an Alias field in a View using a Case statement and next I
want to reference that Alias field in another Alias field with a Case
statement. I get an error stating the first field is not valid. Example of
what I'm trying to do
Column
Alias
CASE WHEN [A] = 0 AND [B] = 1 THEN 1 ELSE 0 END Expr1
CASE WHEN [Expr1] = 1 AND [C] = 1 THEN 1 ELSE 0 END Expr2
SQL doesn't like my referencing Expr1 in the second field. I suppose I could
save the first view and then create a new view based on the first but I was
hoping there might be a way to get around that. Thanks for any help.AkAlan,
As you said, it is an alias and you can not reference it in the same column
list. May be using a derived table, a view, or rewiting the expression.
select
orderid, productid, ext_price * (1.00 - (discount / 100.00)) as exp2
from
(
select orderid, productid, quantity * unitprice as ext_price
from [order details]
) as t
go
AMB
"AkAlan" wrote:

> I have created an Alias field in a View using a Case statement and next I
> want to reference that Alias field in another Alias field with a Case
> statement. I get an error stating the first field is not valid. Example of
> what I'm trying to do
> Column
> Alias
> CASE WHEN [A] = 0 AND [B] = 1 THEN 1 ELSE 0 END Expr1
> CASE WHEN [Expr1] = 1 AND [C] = 1 THEN 1 ELSE 0 END Expr2
> SQL doesn't like my referencing Expr1 in the second field. I suppose I cou
ld
> save the first view and then create a new view based on the first but I wa
s
> hoping there might be a way to get around that. Thanks for any help.
>

Monday, March 12, 2012

Reference View in SubQuery

I am wondering if it is possible to reference a view as a subquery instead
of typing the entire SELECT statement.
I have a query with many subqueries that are the same, just used in both the
FROM and WHERE clauses. If I create the subquery as a view, can I reference
the view?
WBDue to missing DDL i suggest you want to that :
Select * from Table1 T1
Left join
Viewname V1 on
T1.COlumn = V1.column
Left join
Viewname V2 on
T1.COlumn = V2.column
Where V1.Condcolumn = Somevalue AND
V2.Condcolumn = Somevalue
HTH (if not post some ddl), Jens Suessmeyer.
http://www.sqlserver2005.de
--
"WB" <none> schrieb im Newsbeitrag
news:uSZy6cNUFHA.2616@.TK2MSFTNGP14.phx.gbl...
>I am wondering if it is possible to reference a view as a subquery instead
> of typing the entire SELECT statement.
> I have a query with many subqueries that are the same, just used in both
> the
> FROM and WHERE clauses. If I create the subquery as a view, can I
> reference
> the view?
> WB
>|||What is DDL?
thank you for verifying I could use the view method. Makes my syntax easier
to read and fewer lines.
WB
"Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote in
message news:OfSOimNUFHA.1432@.TK2MSFTNGP09.phx.gbl...
> Due to missing DDL i suggest you want to that :
>
> Select * from Table1 T1
> Left join
> Viewname V1 on
> T1.COlumn = V1.column
> Left join
> Viewname V2 on
> T1.COlumn = V2.column
> Where V1.Condcolumn = Somevalue AND
> V2.Condcolumn = Somevalue
> HTH (if not post some ddl), Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
>
> "WB" <none> schrieb im Newsbeitrag
> news:uSZy6cNUFHA.2616@.TK2MSFTNGP14.phx.gbl...
instead
>|||Hi From wwwcoder:
DDL.
DDL stands for Data Definition Language. These are the set of commands that
are used to define the shape of data, and how the data is stored in the
database. These commands also define the structure of database and create
the database objects.
DML
The abbreviated form of Data Modification Language, DML, is used to
define/manipulate the actual data that is stored in the database. This
includes, inserting new data and updating stored data.
DCL
DCL or the Data Control Language, provides you commands by which you can
control access to your data. This includes creating users and granting and
revoking permissions to/from them.
http://www.wwwcoder.com/main/parent...68/default.aspx
HTH, Jens Suessmeyer.
http://www.sqslerver2005.de
"WB" <none> schrieb im Newsbeitrag
news:uiOpRsNUFHA.3140@.TK2MSFTNGP14.phx.gbl...
> What is DDL?
> thank you for verifying I could use the view method. Makes my syntax
> easier
> to read and fewer lines.
> WB
> "Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote
> in
> message news:OfSOimNUFHA.1432@.TK2MSFTNGP09.phx.gbl...
> instead
>|||>> If I create the subquery as a view, can I reference the view? <<
Yes, as long as it is un-correlated.

Saturday, February 25, 2012

Reduce view state size

We are having problems with SQL 200 Reporting services with large view states
being passed to the browser (up to 20Mb). Is there any way of reducing the
view state size used by reporting services, or any way of storing view state
in a database rather than having it passed to the browser with every request?
Thanks,
SJHHi SJH,
I would like to know does this issue appeared on a specified report? If so,
what does this report contained? Does it contain any large amount of text?
It's weird that your reporting services using so much ViewState. How did
you figure out this behavior? Have you got any error message?
Please let me know the information so that I can provide further assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================(This posting is provided "AS IS", with no warranties, and confers no
rights.)|||I've tried to checked on the exact circumstances for this problem, but can't
speak to the individual who reported the problem today.
The problem seems to occur when creating a new subscription for a report.
It does not happen on all reports. I'm not yet sure if it is isolated to a
single report.
S
"Wei Lu [MSFT]" wrote:
> Hi SJH,
> I would like to know does this issue appeared on a specified report? If so,
> what does this report contained? Does it contain any large amount of text?
> It's weird that your reporting services using so much ViewState. How did
> you figure out this behavior? Have you got any error message?
> Please let me know the information so that I can provide further assistance.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications.
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/subscriptions/support/default.aspx.
> ==================================================> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>|||Hi SJH,
Is the subscription a Data driven subscription or a regular subscription?
Have you got any error message when you create the subscription? What's the
report when you try to create the subscription?
Please let me know the result so that I can provide further assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support|||Hi SJH,
How is everything going? Please let me know if you have any questions or
concerns. Thank you!
Sincerely,
Wei Lu
Microsoft Online Community Support