Execution plan for view

We are using SQL 2005/2008 std.  I have a view that joins and self joins
between two tables with various join criteria and the criteria is static.
Once the view is created, we have a query that will join the view with
another big table and the where clause has two parameters which are based on
the big table.  When this query runs with various values in the two
parameters,  I believe the execution plan will be cached based on the new
feature, parameter sniffing in SQL 2005/2008.  Is this correct?  

Furthermore, say a third parameter is introduced in this query, obviously the
optimizer will need to redo the execution plan.  My another question is that
would SQL keeps two execution plans, one for the two parameter one and one
for the three parameter one assuming memory resouce is plenty and these two
queries are run often?  

Keep in mind that the query mentioned above is not a stored procedure.  Our
web application calls the query whenever a user uses that page on our web
application.

od

-- 
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-programming/201003/1

0
OceanDeep
3/24/2010 3:39:58 PM
sqlserver.programming 1873 articles. 0 followers. Follow

6 Replies
814 Views

Similar Articles

[PageSpeed] 44

Hi
You can check it out?
DBCC FREEPROCCACHE
GO
SELECT *
FROM View
WHERE col= <value>
GO

SELECT * FROM View
WHERE col= <another value>
GO

DECLARE @i int
SER @i = 56004
SELECT *
FROM  View
WHERE col= @i
GO

select  stats.execution_count AS exec_count,
 p.size_in_bytes as [size],
 [sql].[text] as [plan_text]
from sys.dm_exec_cached_plans p
outer apply sys.dm_exec_sql_text (p.plan_handle) sql
join sys.dm_exec_query_stats stats ON stats.plan_handle = p.plan_handle
GO




"OceanDeep via SQLMonster.com" <u46587@uwe> wrote in message 
news:a57e274bb4cea@uwe...
> We are using SQL 2005/2008 std.  I have a view that joins and self joins
> between two tables with various join criteria and the criteria is static.
> Once the view is created, we have a query that will join the view with
> another big table and the where clause has two parameters which are based 
> on
> the big table.  When this query runs with various values in the two
> parameters,  I believe the execution plan will be cached based on the new
> feature, parameter sniffing in SQL 2005/2008.  Is this correct?
>
> Furthermore, say a third parameter is introduced in this query, obviously 
> the
> optimizer will need to redo the execution plan.  My another question is 
> that
> would SQL keeps two execution plans, one for the two parameter one and one
> for the three parameter one assuming memory resouce is plenty and these 
> two
> queries are run often?
>
> Keep in mind that the query mentioned above is not a stored procedure. 
> Our
> web application calls the query whenever a user uses that page on our web
> application.
>
> od
>
> -- 
> Message posted via SQLMonster.com
> http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-programming/201003/1
> 


0
Uri
3/24/2010 3:52:27 PM
This is a multi-part message in MIME format.

------=_NextPart_000_0060_01CACB79.17823110
Content-Type: text/plain;
	charset="Utf-8"
Content-Transfer-Encoding: quoted-printable

A view doesn't take parameters. So, we need to know more about exactly =
it is you are doing. Are you for instance using ADO.-NET and =
parameterize your queries? Or something else? Seen from SQL Server's =
viewpoint, there exist only three things:

Literals, as in=20
.... WHERE col =3D 23

Variables, as in
DECLARE @v int =3D 23
....WHERE col =3D @v

.... And parameters to stored procedures and functions.

--=20
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi


  "OceanDeep via SQLMonster.com" <u46587@uwe> wrote in message =
news:a57e274bb4cea@uwe...
  We are using SQL 2005/2008 std.  I have a view that joins and self =
joins
  between two tables with various join criteria and the criteria is =
static.
  Once the view is created, we have a query that will join the view with
  another big table and the where clause has two parameters which are =
based on
  the big table.  When this query runs with various values in the two
  parameters,  I believe the execution plan will be cached based on the =
new
  feature, parameter sniffing in SQL 2005/2008.  Is this correct? =20

  Furthermore, say a third parameter is introduced in this query, =
obviously the
  optimizer will need to redo the execution plan.  My another question =
is that
  would SQL keeps two execution plans, one for the two parameter one and =
one
  for the three parameter one assuming memory resouce is plenty and =
these two
  queries are run often? =20

  Keep in mind that the query mentioned above is not a stored procedure. =
 Our
  web application calls the query whenever a user uses that page on our =
web
  application.

  od

  --=20
  Message posted via SQLMonster.com
  =
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-programming/201003/1=


------=_NextPart_000_0060_01CACB79.17823110
Content-Type: text/html;
	charset="Utf-8"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3Dtext/html;charset=3Dutf-8 http-equiv=3DContent-Type>
<META name=3DGENERATOR content=3D"MSHTML 8.00.7600.16490"></HEAD>
<BODY style=3D"PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: =
15px"=20
id=3DMailContainerBody leftMargin=3D0 topMargin=3D0 =
CanvasTabStop=3D"true"=20
name=3D"Compose message area">
<DIV><FONT size=3D2 face=3DArial>A view doesn't take parameters. So, we =
need to know=20
more about exactly it is you are doing. Are you for instance using =
ADO.-NET and=20
parameterize your queries? Or something else? Seen from SQL Server's =
viewpoint,=20
there exist only three things:</FONT></DIV>
<DIV><FONT size=3D2 face=3DArial></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2 face=3DArial>Literals, as in </FONT></DIV>
<DIV><FONT size=3D2 face=3DArial>... WHERE col =3D 23</FONT></DIV>
<DIV><FONT size=3D2 face=3DArial></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2 face=3DArial>Variables, as in</FONT></DIV>
<DIV><FONT size=3D2 face=3DArial>DECLARE @v int =3D 23</FONT></DIV>
<DIV><FONT size=3D2 face=3DArial>...WHERE col =3D @v</FONT></DIV>
<DIV><FONT size=3D2 face=3DArial></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2 face=3DArial>... And parameters to stored procedures =
and=20
functions.</FONT></DIV>
<DIV><BR>-- <BR>Tibor Karaszi, SQL Server MVP<BR><A=20
href=3D"http://www.karaszi.com/sqlserver/default.asp">http://www.karaszi.=
com/sqlserver/default.asp</A><BR><A=20
href=3D"http://sqlblog.com/blogs/tibor_karaszi">http://sqlblog.com/blogs/=
tibor_karaszi</A></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; =
PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
  <DIV>"OceanDeep via SQLMonster.com" &lt;<A=20
  href=3D"mailto:u46587@uwe">u46587@uwe</A>&gt; wrote in message <A=20
  href=3D"news:a57e274bb4cea@uwe">news:a57e274bb4cea@uwe</A>...</DIV>We =
are using=20
  SQL 2005/2008 std.&nbsp; I have a view that joins and self =
joins<BR>between=20
  two tables with various join criteria and the criteria is =
static.<BR>Once the=20
  view is created, we have a query that will join the view =
with<BR>another big=20
  table and the where clause has two parameters which are based =
on<BR>the big=20
  table.&nbsp; When this query runs with various values in the=20
  two<BR>parameters,&nbsp; I believe the execution plan will be cached =
based on=20
  the new<BR>feature, parameter sniffing in SQL 2005/2008.&nbsp; Is this =

  correct?&nbsp; <BR><BR>Furthermore, say a third parameter is =
introduced in=20
  this query, obviously the<BR>optimizer will need to redo the execution =

  plan.&nbsp; My another question is that<BR>would SQL keeps two =
execution=20
  plans, one for the two parameter one and one<BR>for the three =
parameter one=20
  assuming memory resouce is plenty and these two<BR>queries are run=20
  often?&nbsp; <BR><BR>Keep in mind that the query mentioned above is =
not a=20
  stored procedure.&nbsp; Our<BR>web application calls the query =
whenever a user=20
  uses that page on our web<BR>application.<BR><BR>od<BR><BR>-- =
<BR>Message=20
  posted via SQLMonster.com<BR><A=20
  =
href=3D"http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-programming/=
201003/1">http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-programmin=
g/201003/1</A><BR></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0060_01CACB79.17823110--

0
Tibor
3/24/2010 4:40:18 PM
Tibor,

Thank for the reply.  My wording may be a bit confusing but as mentioned in
my post, the view is static.  Our web application uses that view and joins
another big tables so parameterizing is done in the code in the web
application.  When SQL receives the query, the parameter values (literals)
should be in place already as in your first example.  It is that values will
vary when the query is run.

od

Tibor Karaszi wrote:
>A view doesn't take parameters. So, we need to know more about exactly it is you are doing. Are you for instance using ADO.-NET and parameterize your queries? Or something else? Seen from SQL Server's viewpoint, there exist only three things:
>
>Literals, as in 
>... WHERE col = 23
>
>Variables, as in
>DECLARE @v int = 23
>...WHERE col = @v
>
>... And parameters to stored procedures and functions.
>
>  We are using SQL 2005/2008 std.  I have a view that joins and self joins
>  between two tables with various join criteria and the criteria is static.
>  Once the view is created, we have a query that will join the view with
>  another big table and the where clause has two parameters which are based on
>  the big table.  When this query runs with various values in the two
>  parameters,  I believe the execution plan will be cached based on the new
>  feature, parameter sniffing in SQL 2005/2008.  Is this correct?  
>
>  Furthermore, say a third parameter is introduced in this query, obviously the
>  optimizer will need to redo the execution plan.  My another question is that
>  would SQL keeps two execution plans, one for the two parameter one and one
>  for the three parameter one assuming memory resouce is plenty and these two
>  queries are run often?  
>
>  Keep in mind that the query mentioned above is not a stored procedure.  Our
>  web application calls the query whenever a user uses that page on our web
>  application.
>
>  od
>
>  -- 
>  Message posted via SQLMonster.com
>  http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-programming/201003/1

-- 
Message posted via http://www.sqlmonster.com

0
OceanDeep
3/24/2010 5:06:10 PM
This is a multi-part message in MIME format.

------=_NextPart_000_00AD_01CACB8E.304A9830
Content-Type: text/plain;
	charset="Utf-8"
Content-Transfer-Encoding: quoted-printable

OK, that clear up things a bit. Next question would be if you program in =
a way so that the API parameterize the parameters, or if you concatenate =
the values in your code. I.e., are you using parameter objects or not? =
If you are, you will see RPC_Completed using=20
sp_executesql events in a profiler trace. If not, then you see just the =
SQL submitted as SQL:BatchCompleted for instance. Below is just a bit =
related, but might shed some light on what I mean:

http://sqlblog.com/blogs/tibor_karaszi/archive/2010/01/11/is-there-and-ov=
erhead-to-rpc-events.aspx



--=20
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi


  "OceanDeep via SQLMonster.com" <u46587@uwe> wrote in message =
news:a57ee81484dd1@uwe...
  Tibor,

  Thank for the reply.  My wording may be a bit confusing but as =
mentioned in
  my post, the view is static.  Our web application uses that view and =
joins
  another big tables so parameterizing is done in the code in the web
  application.  When SQL receives the query, the parameter values =
(literals)
  should be in place already as in your first example.  It is that =
values will
  vary when the query is run.

  od

  Tibor Karaszi wrote:
  >A view doesn't take parameters. So, we need to know more about =
exactly it is you are doing. Are you for instance using ADO.-NET and =
parameterize your queries? Or something else? Seen from SQL Server's =
viewpoint, there exist only three things:
  >
  >Literals, as in=20
  >... WHERE col =3D 23
  >
  >Variables, as in
  >DECLARE @v int =3D 23
  >...WHERE col =3D @v
  >
  >... And parameters to stored procedures and functions.
  >
  >  We are using SQL 2005/2008 std.  I have a view that joins and self =
joins
  >  between two tables with various join criteria and the criteria is =
static.
  >  Once the view is created, we have a query that will join the view =
with
  >  another big table and the where clause has two parameters which are =
based on
  >  the big table.  When this query runs with various values in the two
  >  parameters,  I believe the execution plan will be cached based on =
the new
  >  feature, parameter sniffing in SQL 2005/2008.  Is this correct? =20
  >
  >  Furthermore, say a third parameter is introduced in this query, =
obviously the
  >  optimizer will need to redo the execution plan.  My another =
question is that
  >  would SQL keeps two execution plans, one for the two parameter one =
and one
  >  for the three parameter one assuming memory resouce is plenty and =
these two
  >  queries are run often? =20
  >
  >  Keep in mind that the query mentioned above is not a stored =
procedure.  Our
  >  web application calls the query whenever a user uses that page on =
our web
  >  application.
  >
  >  od
  >
  >  --=20
  >  Message posted via SQLMonster.com
  >  =
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-programming/201003/1=


  --=20
  Message posted via http://www.sqlmonster.com

------=_NextPart_000_00AD_01CACB8E.304A9830
Content-Type: text/html;
	charset="Utf-8"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3Dtext/html;charset=3Dutf-8 http-equiv=3DContent-Type>
<META name=3DGENERATOR content=3D"MSHTML 8.00.7600.16490"></HEAD>
<BODY style=3D"PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: =
15px"=20
id=3DMailContainerBody leftMargin=3D0 topMargin=3D0 =
CanvasTabStop=3D"true"=20
name=3D"Compose message area">
<DIV><FONT size=3D2 face=3DArial>OK, that clear up things a bit. Next =
question would=20
be if you program in a way so that the API parameterize the parameters, =
or if=20
you concatenate the values in your code. I.e., are you using parameter =
objects=20
or not? If you are, you will see RPC_Completed using </FONT></DIV>
<DIV><FONT size=3D2 face=3DArial>sp_executesql events in a profiler =
trace. If not,=20
then you see just the SQL submitted as SQL:BatchCompleted for instance. =
Below is=20
just a bit related, but might shed some light on what I =
mean:</FONT></DIV>
<DIV><FONT size=3D2 face=3DArial></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2 face=3DArial><A=20
href=3D"http://sqlblog.com/blogs/tibor_karaszi/archive/2010/01/11/is-ther=
e-and-overhead-to-rpc-events.aspx">http://sqlblog.com/blogs/tibor_karaszi=
/archive/2010/01/11/is-there-and-overhead-to-rpc-events.aspx</A></FONT></=
DIV>
<DIV><FONT size=3D2 face=3DArial></FONT>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>-- <BR>Tibor Karaszi, SQL Server MVP<BR><A=20
title=3D"http://www.karaszi.com/sqlserver/default.asp&#10;CTRL + Click =
to follow link"=20
href=3D"http://www.karaszi.com/sqlserver/default.asp">http://www.karaszi.=
com/sqlserver/default.asp</A><BR><A=20
href=3D"http://sqlblog.com/blogs/tibor_karaszi">http://sqlblog.com/blogs/=
tibor_karaszi</A></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; =
PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
  <DIV>"OceanDeep via SQLMonster.com" &lt;<A=20
  title=3D"mailto:u46587@uwe&#10;CTRL + Click to follow link"=20
  href=3D"mailto:u46587@uwe">u46587@uwe</A>&gt; wrote in message <A=20
  =
href=3D"news:a57ee81484dd1@uwe">news:a57ee81484dd1@uwe</A>...</DIV>Tibor,=
<BR><BR>Thank=20
  for the reply.&nbsp; My wording may be a bit confusing but as =
mentioned=20
  in<BR>my post, the view is static.&nbsp; Our web application uses that =
view=20
  and joins<BR>another big tables so parameterizing is done in the code =
in the=20
  web<BR>application.&nbsp; When SQL receives the query, the parameter =
values=20
  (literals)<BR>should be in place already as in your first =
example.&nbsp; It is=20
  that values will<BR>vary when the query is run.<BR><BR>od<BR><BR>Tibor =
Karaszi=20
  wrote:<BR>&gt;A view doesn't take parameters. So, we need to know more =
about=20
  exactly it is you are doing. Are you for instance using ADO.-NET and=20
  parameterize your queries? Or something else? Seen from SQL Server's=20
  viewpoint, there exist only three things:<BR>&gt;<BR>&gt;Literals, as =
in=20
  <BR>&gt;... WHERE col =3D 23<BR>&gt;<BR>&gt;Variables, as =
in<BR>&gt;DECLARE @v=20
  int =3D 23<BR>&gt;...WHERE col =3D @v<BR>&gt;<BR>&gt;... And =
parameters to stored=20
  procedures and functions.<BR>&gt;<BR>&gt;&nbsp; We are using SQL =
2005/2008=20
  std.&nbsp; I have a view that joins and self joins<BR>&gt;&nbsp; =
between two=20
  tables with various join criteria and the criteria is =
static.<BR>&gt;&nbsp;=20
  Once the view is created, we have a query that will join the view=20
  with<BR>&gt;&nbsp; another big table and the where clause has two =
parameters=20
  which are based on<BR>&gt;&nbsp; the big table.&nbsp; When this query =
runs=20
  with various values in the two<BR>&gt;&nbsp; parameters,&nbsp; I =
believe the=20
  execution plan will be cached based on the new<BR>&gt;&nbsp; feature,=20
  parameter sniffing in SQL 2005/2008.&nbsp; Is this correct?&nbsp;=20
  <BR>&gt;<BR>&gt;&nbsp; Furthermore, say a third parameter is =
introduced in=20
  this query, obviously the<BR>&gt;&nbsp; optimizer will need to redo =
the=20
  execution plan.&nbsp; My another question is that<BR>&gt;&nbsp; would =
SQL=20
  keeps two execution plans, one for the two parameter one and =
one<BR>&gt;&nbsp;=20
  for the three parameter one assuming memory resouce is plenty and =
these=20
  two<BR>&gt;&nbsp; queries are run often?&nbsp; <BR>&gt;<BR>&gt;&nbsp; =
Keep in=20
  mind that the query mentioned above is not a stored procedure.&nbsp;=20
  Our<BR>&gt;&nbsp; web application calls the query whenever a user uses =
that=20
  page on our web<BR>&gt;&nbsp; application.<BR>&gt;<BR>&gt;&nbsp;=20
  od<BR>&gt;<BR>&gt;&nbsp; -- <BR>&gt;&nbsp; Message posted via=20
  SQLMonster.com<BR>&gt;&nbsp; <A=20
  =
href=3D"http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-programming/=
201003/1">http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-programmin=
g/201003/1</A><BR><BR>--=20
  <BR>Message posted via <A=20
  =
href=3D"http://www.sqlmonster.com">http://www.sqlmonster.com</A><BR></BLO=
CKQUOTE></BODY></HTML>

------=_NextPart_000_00AD_01CACB8E.304A9830--

0
Tibor
3/24/2010 7:11:27 PM
od,

SQL Server does not create execution plans for views. It only creates
execution plans for queries. So the fact that you are using a view, and
that that view joins several tables or selfjoins is not relevant.

When you use a view in a query, the view is expanded *, and the view's
definition is merged with the rest of the query before the execution
plan is determined. (* indexed view work differently)

So that reduces your question to the questions:
1) will SQL Server create a new execution plan if you add an extra
expression in the WHERE clause that uses a parameter/local variable.

2) And will the "earlier" execution plan for the query without the extra
expression still be available?

Answer to 1: Yes, a new execution plan will always be determined for a
new query.

Answer to 2: That depends on the way you supply the parameter, and
whether auto-parameterization kicks in. As Uri suggested, it is probably
easiest to simply test this.

-- 
Gert-Jan


"OceanDeep via SQLMonster.com" wrote:
> 
> We are using SQL 2005/2008 std.  I have a view that joins and self joins
> between two tables with various join criteria and the criteria is static.
> Once the view is created, we have a query that will join the view with
> another big table and the where clause has two parameters which are based on
> the big table.  When this query runs with various values in the two
> parameters,  I believe the execution plan will be cached based on the new
> feature, parameter sniffing in SQL 2005/2008.  Is this correct?
> 
> Furthermore, say a third parameter is introduced in this query, obviously the
> optimizer will need to redo the execution plan.  My another question is that
> would SQL keeps two execution plans, one for the two parameter one and one
> for the three parameter one assuming memory resouce is plenty and these two
> queries are run often?
> 
> Keep in mind that the query mentioned above is not a stored procedure.  Our
> web application calls the query whenever a user uses that page on our web
> application.
> 
> od
> 
> --
> Message posted via SQLMonster.com
> http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-programming/201003/1
0
Gert
3/24/2010 8:51:49 PM
OceanDeep via SQLMonster.com (u46587@uwe) writes:
> Thank for the reply.  My wording may be a bit confusing but as mentioned
> in my post, the view is static.  Our web application uses that view and
> joins another big tables so parameterizing is done in the code in the
> web application.  When SQL receives the query, the parameter values
> (literals) should be in place already as in your first example.  

This is bad! You should not interpolate parameter values into the 
query string, but you should use parameterised queries instead. Right
now, you get one new cache entry for each new set of parameters you 
use. There is also the risk for SQL injection.


-- 
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

0
Erland
3/25/2010 11:13:32 PM
Reply:

Similar Artilces:

Outlook viewing attachments
When I receive an email that has embeded pics, I can see the pics and text together as they should be, when going directly to att.net. Also, same on iphone. On Outlook, however, the pics show up as attachments and each must be opened separately. I am sure there is a setting to make them show in the main body of the message. Can you help me? "kenh" <kenh@discussions.microsoft.com> wrote in message news:3C81693E-C419-4B81-A398-F34C78E36DF4@microsoft.com... > When I receive an email that has embeded pics, I can see the pics and text > together as they sho...

Exchange 5.5 to 2003 migration plan
I have a domain named 'mail' containing an Exchange 5.5 server. We need to ultimately have a domain named 'corp' containing all of the user accounts, groups, etc... and an Exchange 2003 server. Please let me know if this is a feasible migration plan. 1. Rename the NT4 domain from 'mail' to 'corp'. 2. Once everything is working correctly, add a temporary BDC to this domain and promote it to a PDC. (Our current NT4 machines do not have the horsepower for 2K3). 3. Upgrade the temporary PDC to Windows 2003 and install Active Directory. 4. Install other W...

SQL script to create views
I think I saw a script somewhere on CustomerSource that would crete views with Table Display Names - would anybody know where to find it? Thanks, Mario Do a search for SDK and GenView (or Gen View, and it's part of the SDK). I believe that's what it's called. It's not so much a script as it is a utility. Clint "Mario" <anonymous@discussions.microsoft.com> wrote in message news:2a5ee01c465b4$e345d620$a301280a@phx.gbl... > I think I saw a script somewhere on CustomerSource that > would crete views with Table Display Names - would anybody > know wh...

CRM 3.0/4.0: Views to show record that is created X Days Ago
I have a simple requirement to create a View with condition that the record is created x days ago, for example the record that is created 3 days ago. The only operator that is available for datetime (e.g. createdon) is only Last X Days, which if i show Last 3 Days, will show the records that were created today, yesterday, and 2 days ago. Is there any operator or any way to show the record that were created 3 days ago? I try to put condition "createdon Last 3 Days" and "NOT createdon Last 2 days", but there is no "NOT" operator in CRM. I try to insert new attribut...

View assending problem Money 2001
When I change the view on my current account to match my paper statements the balance total changes. i.e. Sort by date - Sort Decreasing - Balance �428 - correct Sort by date - Sort Ascending - Balance �210 - wrong Why is this anomaly occurring please? -- Guy Smith Great Missenden, Bucks, England. Web Pages: http://www.smith.dsl.pipex.com ...

Bills and Deposits view
My Bills and deposits in Money 2003 have always been listed by due date. Inadvertantly something must have happened, because now they are listed alphabetically. For the life of me I can't find an option anywhere to change it back. Please help!!!! Hi if you click on the column heading marked 'date' this will sort them in date order. Press it again, and it does reverse date order. You can click on most of the column headings to sort by that field/. -- Glyn Simpson, Microsoft MVP - Money Check http://support.microsoft.com/default.aspx?scid=fh;EN-GB;mny for UK tips and fi...

Program stops executing
I have an instance such that any VB program will not work on a certain PC. It used to, but now the VBNET2005 generated executable will now not execute. I have tried creating a simple project with just a form on it with Hello World in a textbox and even that will not execute in runtime. There is no question of the framework not being installed because it comes standard in the Windows XP SP2 and I have SP3 installed on the PC. I have uninstalled and reinstalled the DotNet framework and this has NOT resolved the issue. Can anyone please shed some light on this matter for me a...

DoEvents and Execution
I'm using AC2003. I have FormA which has two subform controls on it which do not have a SourceObject assigned to them. I do that in the form_open event, see below. What I'm trying to do is to open a simple OneMomentPlease form that has several colored labels used to indicate progress. As I understand it, a DoEvents statement should force all statements prior to it to execute before any following statements to execute. However, it's not working that way. When FormA is opened it runs through all statements. Each sourceobject contains a fairly complex chart and ta...

Manager's View
Hello, I'd like to create a view where managers are able to see opportunities owned by their direct reports as well as their direct report's direct reports. Is this possible? I've successfully created a view which include's the current user's direct reports, and when I tried grouping with an OR I found that I can only group within one entity (i.e. one instance of an entity, not including joining an entity to itself). Thanks, Russ have you thought about creating teams? It won't automatic, but maybe you could key off of team names. For example I have a similar...

How to customize Reminders Window view?
How can I change the Reminders Window view? Mainly, I would like to sort the reminders via "Due In" field. Can this window be given table attributes such as those with redefinable views? If this is a very complicated procedure requiring user- programming, or too long to reply to this post, can I get a lead to find answer? If not possible, a reply confirmation would be GREATLY appreciated. Jordan It's static. You might want to file it as a wish; http://office.microsoft.com/assistance/suggestions.aspx -- Roady [MVP] www.sparnaaij.net Microsoft Office and Microsoft Office...

AD Properties and Outlook Views.
Hi, We have an issue whereby all our user details are hidden in Exchange using the user template in Exchange System Manager. This works fine for hiding private information when viewing user properties in Outlook however if someone right clicks on the user and selects "add to contacts" all this information is pulled into the contact form. Does anyone know where this can be locked down or do we need to secure the actual attributes in AD? Thanks for any help in advance. Cheers Leon Hi Leon, I have the exact same problem here. Did you find a solution ? "LeonG" wrote: >...

Sort order in views drop down on accounts
Hi. How can I control the sort order in the view dropdown list? I have added a couple of new view in the "accounts" and "contact", but it seems that the sequence in the view list, is more or less random. Thanks for any help J Jacob Mondrup IT manager, Cultivator Denmark. Hi, you can set a standard view. --> Homepage - Settings - Systemsettings ----> klick on the Datatype (f.e. Contact) and in the next window you can set the Standard view. -- Greetings from Germany Christian Gr�we Staatl.gepr.Techniker FR Datenkommunikationstechnik MCP, Microsoft Bu...

Execute As
Greetings. I have 2 Databases with 2 different sets of users, and thus 2 different sets of permissions. Certain actions on Database A fires a trigger that executes a stored procedure on database B. If the user in Database A doesn't have permission on Database B, then the procedure fails, and the User gets an error. I have been experimenting with the EXECUTE AS function, but it doesn't seem to work as I had expected. Can anyone give me some tips or point me in the direction of some holiday reading material? Thanks in advance. Matthew Vandermolen Solutions Architecht Worktec...

View conversation containg unread message/s
Is there any way to set a view to make Outlook 2007 show whole conversations/threads containing one or more unread messages? I can show just the unread messages in a folder easily, of course, but can't find a way to make Outlook show the whole conversation whilst hiding all other conversations. -- Regards, Bob No, you can either show all unreads or all conversations but not only conversations with unreads. -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com/ Outlook T...

View Property Values of a Remoting Object
Hi, My application has many remoting objects. Each object has some properties. But I cannot watch the value of these properties using Visual Studio watch windows. I use VS 2005 and 2008. What should I do to view the vaues of the properties Thanks! ...

Printing two views together
How can I print data from two views together in the same job? I've got the code to print a listview, but my SDI app has two listviews separated by a splitter and I want to print both data uninterruptedly on the same sheet. Have I got to manage the work from CMainFrame? Thanks in advance -- Mav Rossi Mav, TN030 has info on how to overload the OnPrint function - which calls StartDoc/EndDoc for a view. You'll have to take away this (StartDoc/EndDoc, that is, not OnPrint :-))). The message for printing comes through the frame, so, yes, you'll have to do some management from CMain...

Mem Usage increase while while executing dialog box
Dear All, Hope I have posted to the correct topic area. Need some help here. 1. I have created a simple dialog box using Visual Studio C++ 6.0, the dialog box contains an multiline read-only Edit Box, a Start Button and a Stop Button. 2. When the Start Button is clicked, the program will execute and the Edit Box will just print out the following text - "Line XX", where XX is the number 3. Problem is that when the program is executed and using Windows Task Manager to monitor the process, there is a high usage of Memory (ranges from 3636K to as high as 40000K). 4. Question ...

Server execution failed
Am trying to play WMV clips. I keep getting Server Execution Failed messages. What's the fix? Thanks. -- James Never mind. Fixed it by running a registry cleaner. Odd. -- James "James Ko" <iamwho@hawaii.rr.com> wrote in message news:uhbKodidKHA.6096@TK2MSFTNGP02.phx.gbl... > Am trying to play WMV clips. I keep getting Server Execution Failed > messages. What's the fix? Thanks. > > -- > James ...

Search Folders
I want to set up a search folder in Outlook 2003 that only shows flagged email that are overdue. I have successfully edited the search criteria and defined a search that only shows the flags that are due today. However I want a criteria that only shows the flags that are due now. I have set up a criteria that states: "Due By" - "On or before" - "Today" which works but I want to filter out the ones that are not due until later in the day. If i put in: "Due By" - "On or before" - "Now" it shows items due tomorrow. Does an...

Updating Form Field During Execution
I have a textbox field on a form in which I enter the number of times to execute a particular loop in my program. If I enter 2000, I would like for the field to change, maybe every 100 executions, to show how many remaining executions there are. I am changing the value (textbox.value = xx) after each 100 executions, but the field on the form does not refresh until all 2000 loops have been executed. Is there some way to accomplish this? -- Bill @ UAMS This is a userform? Try changing your value: me.textbox.value = clng(me.textbox.value) - 100 me.repaint BillCPA wrote: >...

Cached Plan DMV Questions
http://blogs.msdn.com/sqlprogrammability/archive/2007/01/23/4-0-useful-queries-on-dmv-s-to-understand-plan-cache-behavior.aspx I found these set of queries excellent for digging into some plan cache issues I'm having, but I have a few questions. 1) I don't quite understand the widely varied sizes I get for the same plan using: - sys.dm_exec_cached_plans.size_in_bytes - sys.dm_os_memory_cache_entries.pages_allocated_count * 8192 - sys.dm_os_memory_objects.pages_allocated_count * sys.dm_os_memory_objects.page_size_in_bytes I can add up the values for PLANSKELETON,...

Exchange Administrator can not view subscribers mailbox in Oulook
Hello: I have an Exchange Server 2003 Enterprise edition running in native mode with three storage groups, bronze, silver and gold. When an administrator attempts to add a users mailbox to their (administrators) Outlook they are unable to view any content if the users mailbox is not under the bronze mail store (first mail store). I found an KB article that discussed this problem and claimed it was corrected in SP2 for Exchange. After installing SP2 the problem is still ocurring. I have verified that the administrators have rights to access ay users mailbox. Any ideas? -- Mick Montg...

Custom Views
I see from other posts that there is no way to copy a custom view from one worksheet to another (aside from using "save as" as a work around). My next question then is there any way to disply what settings are inherent in a custom view so that I can re-create it in another sheet? Thanks, Parls What types of Custom Views? If you have a view of a filtered worksheet would that filter necessarily be valid for the next sheet? If some columns or rows were hidden would you want the same view for the next sheet? You could just make a copy of the sheet and Custom Views...

Execute an executable program.
How can I in code (VB.NET 2008) execute another executable program ? Thanks :) On Mar 26, 11:21=A0am, "Mr. X." <nospam@nospam_please.com> wrote: > How can I in code (VB.NET 2008) execute another executable program ? > > Thanks :) Process.Start("path_of_exe") http://msdn.microsoft.com/en-us/library/system.diagnostics.process.start.as= px is what you want. HTH, Onur G=FCzel Am 26.03.2010 10:21, schrieb Mr. X.: > How can I in code (VB.NET 2008) execute another executable program ? 'System.Diagnostics.Process.Start' or &#...

EXECUTE
HOW DO YOU DO AN EXECUTE? could you please be a bit more specific? what is your question? execute what? "AS" wrote: > HOW DO YOU DO AN EXECUTE? I AM DOING AN ADO IN DEXTERITY CALLING A STORED PROCEDURE AND WOULD LIKE TO EXECUTE THE COMMAND. WHAT DO I DO? "26point2er" wrote: > could you please be a bit more specific? > > what is your question? execute what? > > > > "AS" wrote: > > > HOW DO YOU DO AN EXECUTE? Stop SHOUTING, for one thing. "AS" <AS@discussions.microsoft.com> wrote in message news:675...