<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6300224662881808865</id><updated>2024-09-11T04:28:53.315+01:00</updated><category term="2008R2"/><category term="2012"/><category term="TSQL"/><category term="2005"/><category term="2008"/><category term="SQL Script"/><category term="2000"/><category term="SQL Server"/><category term="SCVMM"/><category term="Cluster"/><category term="Create"/><category term="Denali"/><category term="Insert"/><category term="Into"/><category term="Join"/><category term="Missing Identity Values"/><category term="P2V"/><category term="Row_number()"/><category term="Search"/><category term="Select"/><category term="Storage"/><category term="Stored Procedure"/><category term="Update"/><category term="View"/><title type='text'>All to share !!</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.vspatel.co.uk/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6300224662881808865/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://blog.vspatel.co.uk/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Vishal Patel</name><uri>http://www.blogger.com/profile/09216439267443776160</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6300224662881808865.post-8944408303959571107</id><published>2012-08-17T14:17:00.000+01:00</published><updated>2012-08-17T14:42:40.800+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="2005"/><category scheme="http://www.blogger.com/atom/ns#" term="2008"/><category scheme="http://www.blogger.com/atom/ns#" term="2008R2"/><category scheme="http://www.blogger.com/atom/ns#" term="2012"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Script"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="TSQL"/><title type='text'>SQL Server–Start SQL Server instance in single-user mode</title><content type='html'>&lt;p&gt;There are certain situations when you have to start SQL server in single-user mode from the start up. For example, you may want to restore Master database or recover other system database or to change server configuration options and that will require to start an Instance of SQL Server in single-user mode. &lt;ul&gt; &lt;li&gt;To start SQL Server in single-user mode is very simple. Please use MS-DOS change directory (cd) command to move to the correct (SQL Instance) directory before starting sqlservr.exe, as shown below&lt;/li&gt;&lt;/ul&gt; &lt;blockquote&gt; &lt;p&gt;&lt;strong&gt;cd \Program Files\Microsoft SQL Server\MSSQL10.50.MSSQLSERVER\MSSQL\Binn&lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;blockquote&gt; &lt;p&gt;To start default instance enter the following command&lt;/p&gt;&lt;/blockquote&gt; &lt;blockquote&gt; &lt;p&gt;&lt;strong&gt;sqlservr.exe –m&lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;blockquote&gt; &lt;p&gt;To start named instance of SQL Server enter the following command&lt;/p&gt;&lt;/blockquote&gt; &lt;blockquote&gt; &lt;p&gt;&lt;strong&gt;sqlservr.exe - m -s &amp;lt;instancename&amp;gt;&lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;blockquote&gt; &lt;p&gt;Connect to SQL Server instance using SSMS or sqlcmd after running above command – Make sure to keep MS-Dos command window open. To stop single-user mode just press CTRL+C and it will prompt you to stop SQL Service.&lt;/p&gt;&lt;/blockquote&gt; &lt;ul&gt; &lt;li&gt;Alternatively (easy) use SQL Server Configuration Manager and click on SQL Server Services. Right click on desired SQL Server Instance and go to properties. On the advance table enter param ‘-m;’ before existing params in the startup parameters. Press apply and then restart the SQL Server Instance service.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Make sure to remove added parameter and restart service to allow multiuser connection. &lt;blockquote&gt; &lt;p style=&quot;line-height: normal; margin: 0cm 0cm 0pt; background: #ffffb7; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; color: maroon; font-size: 10pt; mso-fareast-language: en-gb; mso-fareast-font-family: &#39;Times New Roman&#39;&quot;&gt;Note: &lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; color: maroon; font-size: 10pt; mso-fareast-language: en-gb; mso-fareast-font-family: &#39;Times New Roman&#39;&quot;&gt;Stop the SQL Server Agent service before connecting to an instance of SQL Server in single-user mode; otherwise, the SQL Server Agent service uses the connection, thereby blocking it.&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;Technorati Tags: &lt;a href=&quot;http://technorati.com/tags/Server&quot; rel=&quot;tag&quot;&gt;Server&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/instance&quot; rel=&quot;tag&quot;&gt;instance&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/user&quot; rel=&quot;tag&quot;&gt;user&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/mode&quot; rel=&quot;tag&quot;&gt;mode&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/Master&quot; rel=&quot;tag&quot;&gt;Master&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/database&quot; rel=&quot;tag&quot;&gt;database&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/system&quot; rel=&quot;tag&quot;&gt;system&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/configuration&quot; rel=&quot;tag&quot;&gt;configuration&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/Microsoft&quot; rel=&quot;tag&quot;&gt;Microsoft&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/MSSQLSERVER&quot; rel=&quot;tag&quot;&gt;MSSQLSERVER&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/MSSQL&quot; rel=&quot;tag&quot;&gt;MSSQL&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/Binn&quot; rel=&quot;tag&quot;&gt;Binn&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/SSMS&quot; rel=&quot;tag&quot;&gt;SSMS&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/Service&quot; rel=&quot;tag&quot;&gt;Service&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/Manager&quot; rel=&quot;tag&quot;&gt;Manager&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/Services&quot; rel=&quot;tag&quot;&gt;Services&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/Agent&quot; rel=&quot;tag&quot;&gt;Agent&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/sqlservr&quot; rel=&quot;tag&quot;&gt;sqlservr&lt;/a&gt;  </content><link rel='replies' type='application/atom+xml' href='http://blog.vspatel.co.uk/feeds/8944408303959571107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6300224662881808865/8944408303959571107' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6300224662881808865/posts/default/8944408303959571107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6300224662881808865/posts/default/8944408303959571107'/><link rel='alternate' type='text/html' href='http://blog.vspatel.co.uk/2012/08/sql-serverstart-sql-server-instance-in.html' title='SQL Server–Start SQL Server instance in single-user mode'/><author><name>Vishal Patel</name><uri>http://www.blogger.com/profile/09216439267443776160</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6300224662881808865.post-1684323028281300599</id><published>2012-07-25T12:20:00.001+01:00</published><updated>2012-07-25T12:21:14.708+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Missing Identity Values"/><category scheme="http://www.blogger.com/atom/ns#" term="Row_number()"/><title type='text'>How to find Missing Identity Values?</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 16pt; line-height: 115%;&quot;&gt;How to find
Missing Identity Values?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; line-height: 115%;&quot;&gt;One of my friends
asked me long time ago to get missing identity values. Through power of Row_Number()
Window function we can achieve it as below.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: green; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;--Logic To
Identify Missing Values.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;Declare&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;
@MissingIdentityValues &lt;span style=&quot;color: blue;&quot;&gt;Table&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: grey; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;(&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IDCol &lt;span style=&quot;color: blue;&quot;&gt;Int&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: grey; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;Insert&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;
@MissingIdentityValues&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;IDCol&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Values &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;1&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;2&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;5&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;7&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;8&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;10&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;11&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;15&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;16&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;Select&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt; &lt;span style=&quot;color: magenta;&quot;&gt;MIN&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;IDCol&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt; StartRange&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: magenta;&quot;&gt;MAX&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;IDCol&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt;&amp;nbsp; EndRange &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;From&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;(&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;select&lt;/span&gt; IDCol &lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt; IDCol &lt;span style=&quot;color: grey;&quot;&gt;-&lt;/span&gt;&amp;nbsp; &lt;span style=&quot;color: magenta;&quot;&gt;ROW_NUMBER&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;()&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;OVER&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;Order&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;By&lt;/span&gt; IDCol&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;as&lt;/span&gt; GroupDiff&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;from&lt;/span&gt;
@MissingIdentityValues&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt;
GroupDiff&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;Group&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;By&lt;/span&gt;
GroupDiff&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.vspatel.co.uk/feeds/1684323028281300599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6300224662881808865/1684323028281300599' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6300224662881808865/posts/default/1684323028281300599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6300224662881808865/posts/default/1684323028281300599'/><link rel='alternate' type='text/html' href='http://blog.vspatel.co.uk/2012/07/normal-0-false-false-false-en-gb-x-none.html' title='How to find Missing Identity Values?'/><author><name>Balwant</name><uri>http://www.blogger.com/profile/15247139617050282380</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6300224662881808865.post-5663224054633946769</id><published>2012-05-14T14:36:00.000+01:00</published><updated>2012-05-14T15:04:30.403+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Denali"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="TSQL"/><title type='text'>SQL Server – AdventureWorks for SQL Server 2012</title><content type='html'>I have just started learning about SQL Server 2012 RTM and realised that I haven’t installed AdventureWorks sample database. I have quickly searched online and reached to &lt;a href=&quot;http://msftdbprodsamples.codeplex.com/&quot; target=&quot;_blank&quot;&gt;Microsoft Database Products Samples&lt;/a&gt; where it provides information about all sample databases and procedure to install databases for SQL Server 2012. See below to install (restore) database:  &lt;ol&gt; &lt;li&gt;Download AdventureWorks from &lt;a href=&quot;http://msftdbprodsamples.codeplex.com/releases/view/55330#DownloadId=165399&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;  &lt;li&gt;Run below script&lt;/li&gt;&lt;/ol&gt; &lt;div id=&quot;codeSnippetWrapper&quot; class=&quot;csharpcode-wrapper&quot;&gt; &lt;div id=&quot;codeSnippet&quot; class=&quot;csharpcode&quot;&gt; &lt;div style=&quot;padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px&quot; id=&quot;scid:9D7513F9-C04C-4721-824A-2B34F0212519:68be2551-de06-4a8b-b887-a0d2ac38e953&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;&lt;pre style=&quot; width: 475px; height: 41px;background-color:White;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: visible;&quot;&gt;&lt;div&gt;&lt;!--&lt;br /&gt;&lt;br /&gt;Code highlighting produced by Actipro CodeHighlighter (freeware)&lt;br /&gt;http://www.CodeHighlighter.com/&lt;br /&gt;&lt;br /&gt;--&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;DATABASE&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt; AdventureWorks2012&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;ON&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt; (FILENAME &lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;D:\SQL\AdventureWorks2012_Data.mdf&lt;/span&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;)&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;FOR&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt; ATTACH_REBUILD_LOG ;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn&#39;s Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;You will see below message and you are &lt;strong&gt;DONE&lt;/strong&gt; after running above script!&lt;/p&gt;&lt;span style=&quot;font-family: consolas; font-size: 9pt; mso-fareast-language: en-gb&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;br /&gt;&lt;p style=&quot;line-height: normal; margin: 0cm 0cm 0pt; text-autospace: ; mso-layout-grid-align: none&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: consolas; font-size: 9pt; mso-fareast-language: en-gb&quot;&gt;&lt;font size=&quot;1&quot;&gt;&lt;font color=&quot;#333333&quot;&gt;File activation failure. The physical file name &quot;C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\AdventureWorks2012_Log.ldf&quot; may be incorrect.&lt;?xml:namespace prefix = o ns = &quot;urn:schemas-microsoft-com:office:office&quot; /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style=&quot;line-height: normal; margin: 0cm 0cm 0pt; text-autospace: ; mso-layout-grid-align: none&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: consolas; font-size: 9pt; mso-fareast-language: en-gb&quot;&gt;&lt;font size=&quot;1&quot;&gt;&lt;font color=&quot;#333333&quot;&gt;New log file &#39;D:\SQL\AdventureWorks2012_log.ldf&#39; was created.&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style=&quot;line-height: normal; margin: 0cm 0cm 0pt; text-autospace: ; mso-layout-grid-align: none&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: consolas; font-size: 9pt; mso-fareast-language: en-gb&quot;&gt;&lt;font size=&quot;1&quot;&gt;&lt;font color=&quot;#333333&quot;&gt;Converting database &#39;AdventureWorks2012&#39; from version 705 to the current version 706.&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style=&quot;line-height: normal; margin: 0cm 0cm 0pt; text-autospace: ; mso-layout-grid-align: none&quot; class=&quot;MsoNormal&quot;&gt;&lt;/font&gt;&lt;span style=&quot;font-family: consolas; font-size: 9pt; mso-fareast-language: en-gb&quot;&gt;&lt;font color=&quot;#333333&quot; size=&quot;1&quot;&gt;Database &#39;AdventureWorks2012&#39; running the upgrade step from version 705 to version 706.&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;font size=&quot;1&quot; face=&quot;Consolas&quot;&gt;&lt;font size=&quot;1&quot; face=&quot;Consolas&quot;&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face=&quot;Consolas&quot;&gt;&lt;font face=&quot;Consolas&quot;&gt;&lt;br /&gt;&lt;p style=&quot;line-height: normal; margin: 0cm 0cm 0pt; text-autospace: ; mso-layout-grid-align: none&quot; class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;&lt;p style=&quot;line-height: normal; margin: 0cm 0cm 0pt; text-autospace: ; mso-layout-grid-align: none&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: consolas; font-size: 9pt; mso-fareast-language: en-gb&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;font size=&quot;1&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8laHmeonCR7AMgaZwLkJ1Et53hPMQBWkUo1TCXL4UkyEs1CSPs-_0jAB3aT1Yj6muMWuqIT5vVmAOKJSjfuCoT2NwikliTiXrw1Un03ZqrM1iww9AN929cJNxBVJK0tsdnhAMDv7eT7Y/s1600-h/AttachDatbasewithoutlog%25255B38%25255D.jpg&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;AttachDatbasewithoutlog&quot; border=&quot;0&quot; alt=&quot;AttachDatbasewithoutlog&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2HqTjuHNzHrou-HX0v32G6m-zleZN6sbqS9M88YVeVNzPcJLKbYTNkt7W6dY8R4nkXuSloFsNlT4hxZrKmYX6c7rMEUGoxnzjFFYYo_Efzc6Uk-bRD4jvnls54AzRpnNDyObEQK7Ru40/?imgmax=800&quot; width=&quot;542&quot; height=&quot;151&quot;&gt;&lt;/a&gt; &lt;br /&gt;&lt;div style=&quot;padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px&quot; id=&quot;scid:0767317B-992E-4b12-91E0-4F059A8CECA8:230affe3-8fe6-4878-8d93-e3c26296283b&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;Technorati Tags: &lt;a href=&quot;http://technorati.com/tags/Server&quot; rel=&quot;tag&quot;&gt;Server&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/AdventureWorks&quot; rel=&quot;tag&quot;&gt;AdventureWorks&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/database&quot; rel=&quot;tag&quot;&gt;database&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/Microsoft&quot; rel=&quot;tag&quot;&gt;Microsoft&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/Products&quot; rel=&quot;tag&quot;&gt;Products&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/Samples&quot; rel=&quot;tag&quot;&gt;Samples&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/databases&quot; rel=&quot;tag&quot;&gt;databases&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/procedure&quot; rel=&quot;tag&quot;&gt;procedure&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/Download&quot; rel=&quot;tag&quot;&gt;Download&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/script&quot; rel=&quot;tag&quot;&gt;script&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/CREATE&quot; rel=&quot;tag&quot;&gt;CREATE&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/FILENAME&quot; rel=&quot;tag&quot;&gt;FILENAME&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/ATTACH_REBUILD_LOG&quot; rel=&quot;tag&quot;&gt;ATTACH_REBUILD_LOG&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/activation&quot; rel=&quot;tag&quot;&gt;activation&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/failure&quot; rel=&quot;tag&quot;&gt;failure&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/MSSQLSERVER&quot; rel=&quot;tag&quot;&gt;MSSQLSERVER&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/MSSQL&quot; rel=&quot;tag&quot;&gt;MSSQL&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/DATA&quot; rel=&quot;tag&quot;&gt;DATA&lt;/a&gt;&lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='http://blog.vspatel.co.uk/feeds/5663224054633946769/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6300224662881808865/5663224054633946769' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6300224662881808865/posts/default/5663224054633946769'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6300224662881808865/posts/default/5663224054633946769'/><link rel='alternate' type='text/html' href='http://blog.vspatel.co.uk/2012/05/sql-server-adventureworks-for-sql.html' title='SQL Server – AdventureWorks for SQL Server 2012'/><author><name>Vishal Patel</name><uri>http://www.blogger.com/profile/09216439267443776160</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2HqTjuHNzHrou-HX0v32G6m-zleZN6sbqS9M88YVeVNzPcJLKbYTNkt7W6dY8R4nkXuSloFsNlT4hxZrKmYX6c7rMEUGoxnzjFFYYo_Efzc6Uk-bRD4jvnls54AzRpnNDyObEQK7Ru40/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6300224662881808865.post-813265521591902565</id><published>2012-04-18T16:53:00.001+01:00</published><updated>2012-04-20T10:49:16.337+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="2008R2"/><category scheme="http://www.blogger.com/atom/ns#" term="2012"/><category scheme="http://www.blogger.com/atom/ns#" term="SCVMM"/><title type='text'>SCVMM 2012 RC to RTM upgrade fails with error “upgrading from currently version is not supported”</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;I&amp;nbsp; have just tried to upgrade SCVMM 2012 RC to RTM and it failed to upgrade with following error “Upgrading from the currently installed version of VMM System Center 2012 Virtual Machine Manager is not supported. You must be running VMM 2008 R2 with Service Pack 1 (SP1) to upgrade to System Center 2012 Virtual Machine Manager.”&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuGtLliUYKg9Bfit8iY0p4e93jzK6njZ4CdW4IbWZKrLXwQLEI_4u9ZX1mdZOX8Oz92XMme807JoZHjJ1PtlFuX3zyF9rETdKNX74pr0LVAShIinB3o-91uwuR9UGzQOUbJz8ISnyaU6s/s1600-h/VMM2012RC2RTMError13.jpg&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; margin: 0px 0px 0px 10px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;VMM2012RC2RTMError&quot; border=&quot;0&quot; alt=&quot;VMM2012RC2RTMError&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAbxLwmaUZ2iyfi5DbJbV2RjvMdfKjnDPg7ZReUMeONpVvj1E30xdVHecWI2ePT6tjz7BgbLw4pw-oTWqOJ2muCh7omHY5VqtmZLLSStfaTyR2EhK3YhVRGp9EhOkpUCEx78ECFD-v3M8/?imgmax=800&quot; width=&quot;417&quot; height=&quot;169&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style=&quot;text-indent: -18pt; background: white; margin-left: 36pt; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt&quot;&gt;&lt;span style=&quot;font-family: symbol; color: #333333; font-size: 10pt; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol&quot;&gt;&lt;span style=&quot;mso-list: ignore&quot;&gt;·&lt;span style=&quot;font: 7pt &#39;Times New Roman&#39;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Arial&#39;,&#39;sans-serif&#39;; color: #333333; font-size: 10pt&quot;&gt;Uninstall current (RC) version of SCVMM. Make sure you select “&lt;strong&gt;&lt;span style=&quot;font-family: &#39;Arial&#39;,&#39;sans-serif&#39;&quot;&gt;Retain Database&lt;/span&gt;&lt;/strong&gt;” in Database Options.&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;text-indent: -18pt; background: white; margin-left: 36pt; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt&quot;&gt;&lt;span style=&quot;font-family: &#39;Arial&#39;,&#39;sans-serif&#39;; color: #333333; font-size: 10pt&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: symbol; color: #333333; font-size: 10pt; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol&quot;&gt;&lt;span style=&quot;mso-list: ignore&quot;&gt;·&lt;span style=&quot;font: 7pt &#39;Times New Roman&#39;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Arial&#39;,&#39;sans-serif&#39;; color: #333333; font-size: 10pt&quot;&gt;Using SQL Server Management Studio modify values of “DatabaseVersion” and “QFEDatabaseVersion” in table&amp;nbsp; tbl_VMM_GlobalSetting from RC (3.0.5007.0) to RTM (3.0.6005.0 or alternatively match to the version of setup.exe). &lt;?xml:namespace prefix = o ns = &quot;urn:schemas-microsoft-com:office:office&quot; /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;background: white&quot;&gt;&lt;span style=&quot;font-family: &#39;Arial&#39;,&#39;sans-serif&#39;; color: #333333; font-size: 10pt&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJJ5eB4PTB_I1BhllDLXeI2RVtsAH_g8LzyfIkcWiaqp7V6nw3GhRnit2jLfzv1ZwCPC0hO3NLjB8fEuj36KBnSsuX1_CyPhd8gXsK53vDDEIe9C9iPbLx-SuH8ksRbjjoagyK8ndV7Zs/s1600-h/VMM2012RC2RTMTableProperties2.jpg&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; margin: 0px 0px 0px 50px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;VMM2012RC2RTMTableProperties&quot; border=&quot;0&quot; alt=&quot;VMM2012RC2RTMTableProperties&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj27NKkkpqZcX4BhAkThMMisP1_FaazAShJOtzSyeak5DS-pfVCHpvE8LubXS4tbWkZfUTqjBWZ26QVnvAgnznBkXQmE_cCC-AXqtjGqrc-R9UMD0o9pCgBk82vOwMDWKH2MOxlRCgS1mk/?imgmax=800&quot; width=&quot;212&quot; height=&quot;51&quot;&gt;&lt;/a&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;ul&gt; &lt;li style=&quot;background: white&quot;&gt;&lt;span style=&quot;font-family: &#39;Arial&#39;,&#39;sans-serif&#39;; color: #333333; font-size: 10pt&quot;&gt;&lt;o:p&gt;Start SCVMM 2012 installation and select existing database.&lt;/o:p&gt;&lt;/span&gt;  &lt;li style=&quot;background: white&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-family: &#39;Arial&#39;,&#39;sans-serif&#39;; color: #333333; font-size: 10pt&quot;&gt;&lt;o:p&gt;Finally, Don’t forget to update the VMM host agents!! &lt;/o:p&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt; &lt;div style=&quot;padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px&quot; id=&quot;scid:0767317B-992E-4b12-91E0-4F059A8CECA8:72152e11-ac80-4648-917f-939ad66aa76d&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;Technorati Tags: &lt;a href=&quot;http://technorati.com/tags/SCVMM+2012&quot; rel=&quot;tag&quot;&gt;SCVMM 2012&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/2012&quot; rel=&quot;tag&quot;&gt;2012&lt;/a&gt;&lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='http://blog.vspatel.co.uk/feeds/813265521591902565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6300224662881808865/813265521591902565' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6300224662881808865/posts/default/813265521591902565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6300224662881808865/posts/default/813265521591902565'/><link rel='alternate' type='text/html' href='http://blog.vspatel.co.uk/2012/04/scvmm-2012-rc-to-rtm-upgrade-fails-with.html' title='SCVMM 2012 RC to RTM upgrade fails with error “upgrading from currently version is not supported”'/><author><name>Vishal Patel</name><uri>http://www.blogger.com/profile/09216439267443776160</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAbxLwmaUZ2iyfi5DbJbV2RjvMdfKjnDPg7ZReUMeONpVvj1E30xdVHecWI2ePT6tjz7BgbLw4pw-oTWqOJ2muCh7omHY5VqtmZLLSStfaTyR2EhK3YhVRGp9EhOkpUCEx78ECFD-v3M8/s72-c?imgmax=800" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6300224662881808865.post-3843157649010329541</id><published>2012-03-07T19:17:00.001+00:00</published><updated>2012-03-15T14:31:37.433+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="2000"/><category scheme="http://www.blogger.com/atom/ns#" term="2005"/><category scheme="http://www.blogger.com/atom/ns#" term="2008"/><category scheme="http://www.blogger.com/atom/ns#" term="2008R2"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Script"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="TSQL"/><title type='text'>How to Round to 2 decimal places without Round function</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Today, Someone asked me how to round float value to 2 decimal places without using T-SQL Round function. Let me know your thoughts for below T-SQL block.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;ecxMsoNormal&quot; style=&quot;background-color: white; color: #2a2a2a; font-family: Calibri, sans-serif; font-size: 11pt; line-height: 19px; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt; line-height: 17px;&quot;&gt;Declare&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt; line-height: 17px;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;ecxMsoNormal&quot; style=&quot;background-color: white; color: #2a2a2a; font-family: Calibri, sans-serif; font-size: 11pt; line-height: 19px; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt; line-height: 17px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @MyValue&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Float&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt;&amp;nbsp;3.1471&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;ecxMsoNormal&quot; style=&quot;background-color: white; color: #2a2a2a; font-family: Calibri, sans-serif; font-size: 11pt; line-height: 19px; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt; line-height: 17px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @IntPart1&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt;&amp;nbsp;0&amp;nbsp;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;ecxMsoNormal&quot; style=&quot;background-color: white; color: #2a2a2a; font-family: Calibri, sans-serif; font-size: 11pt; line-height: 19px; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt; line-height: 17px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @intPart2&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt;&amp;nbsp;0&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;ecxMsoNormal&quot; style=&quot;background-color: white; color: #2a2a2a; font-family: Calibri, sans-serif; font-size: 11pt; line-height: 19px; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt; line-height: 17px;&quot;&gt;Select&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt; line-height: 17px;&quot;&gt;&amp;nbsp;@IntPart1&lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt;@MyValue&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;ecxMsoNormal&quot; style=&quot;background-color: white; color: #2a2a2a; font-family: Calibri, sans-serif; font-size: 11pt; line-height: 19px; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt; line-height: 17px;&quot;&gt;select&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt; line-height: 17px;&quot;&gt;&amp;nbsp;@intPart2&amp;nbsp;&lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;@MyValue&amp;nbsp;&lt;span style=&quot;color: grey;&quot;&gt;-&lt;/span&gt;&amp;nbsp;@IntPart1&lt;span style=&quot;color: grey;&quot;&gt;)*&lt;/span&gt;100&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;ecxMsoNormal&quot; style=&quot;background-color: white; color: #2a2a2a; font-family: Calibri, sans-serif; font-size: 11pt; line-height: 19px; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt; line-height: 17px;&quot;&gt;If&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt; line-height: 17px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt; line-height: 17px;&quot;&gt;@MyValue&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: grey;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;Cast&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;@IntPart1&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Float&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: grey;&quot;&gt;+&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;Cast&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;@intPart2&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;Float&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)/&lt;/span&gt;100&lt;span style=&quot;color: grey;&quot;&gt;))*&lt;/span&gt;10000&amp;nbsp;&lt;span style=&quot;color: grey;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;50&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;ecxMsoNormal&quot; style=&quot;background-color: white; color: #2a2a2a; font-family: Calibri, sans-serif; font-size: 11pt; line-height: 19px; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt; line-height: 17px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Select&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;Cast&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;@IntPart1&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Float&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: grey;&quot;&gt;+&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;Cast&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;@intPart2&lt;span style=&quot;color: grey;&quot;&gt;+&lt;/span&gt;1&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Float&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)/&lt;/span&gt;100&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt;Round1&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;ecxMsoNormal&quot; style=&quot;background-color: white; color: #2a2a2a; font-family: Calibri, sans-serif; font-size: 11pt; line-height: 19px; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt; line-height: 17px;&quot;&gt;Else&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;ecxMsoNormal&quot; style=&quot;background-color: white; color: #2a2a2a; font-family: Calibri, sans-serif; font-size: 11pt; line-height: 19px; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt; line-height: 17px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Select&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;Cast&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;@IntPart1&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Float&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: grey;&quot;&gt;+&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;Cast&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;@intPart2&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Float&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)/&lt;/span&gt;100&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;Round1&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.vspatel.co.uk/feeds/3843157649010329541/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6300224662881808865/3843157649010329541' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6300224662881808865/posts/default/3843157649010329541'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6300224662881808865/posts/default/3843157649010329541'/><link rel='alternate' type='text/html' href='http://blog.vspatel.co.uk/2012/03/how-to-round-to-2-decimal-place-without.html' title='How to Round to 2 decimal places without Round function'/><author><name>Balwant</name><uri>http://www.blogger.com/profile/15247139617050282380</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6300224662881808865.post-1189514366842409908</id><published>2012-02-23T18:23:00.001+00:00</published><updated>2012-02-24T14:23:19.729+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="2000"/><category scheme="http://www.blogger.com/atom/ns#" term="2005"/><category scheme="http://www.blogger.com/atom/ns#" term="2008"/><category scheme="http://www.blogger.com/atom/ns#" term="2008R2"/><category scheme="http://www.blogger.com/atom/ns#" term="2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Create"/><category scheme="http://www.blogger.com/atom/ns#" term="Insert"/><category scheme="http://www.blogger.com/atom/ns#" term="Into"/><category scheme="http://www.blogger.com/atom/ns#" term="Select"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Script"/><category scheme="http://www.blogger.com/atom/ns#" term="TSQL"/><title type='text'>SELECT INTO TABLE – INSERT INTO SELECT Inserting data from from one table to another</title><content type='html'>&lt;blockquote&gt;&lt;/blockquote&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p align=&quot;justify&quot;&gt;There are two different methods to insert data from one table to another. Although its really useful but there are few limitation in both of below methods. &lt;strong&gt;Don&#39;t forget to read list of limitations and restrictions below.&lt;/strong&gt;&lt;/p&gt; &lt;p style=&quot;line-height: normal; margin: 0cm 0cm 0pt 17.85pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;span style=&quot;font-family: &#39;Arial&#39;,&#39;sans-serif&#39;; font-size: 9pt&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;1. SELECT INTO &lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style=&quot;line-height: normal; margin: 0cm 0cm 0pt 17.85pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &#39;Arial&#39;,&#39;sans-serif&#39;; font-size: 9pt&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;font size=&quot;2&quot;&gt;Below method will create table when data is inserted from one table to another table. Its useful when you need exactly same datatype as source table.&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;line-height: normal; margin: 0cm 0cm 0pt 17.85pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &#39;Arial&#39;,&#39;sans-serif&#39;; font-size: 9pt&quot;&gt;&lt;font color=&quot;#000000&quot; size=&quot;2&quot;&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt; &lt;blockquote&gt; &lt;div style=&quot;padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px&quot; id=&quot;scid:9D7513F9-C04C-4721-824A-2B34F0212519:b8232167-eb0c-4439-b789-ed9300346d7b&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;&lt;pre style=&quot; width: 510px; height: 267px;background-color:White;overflow: auto;&quot;&gt;&lt;div&gt;&lt;!--&lt;br /&gt;&lt;br /&gt;Code highlighting produced by Actipro CodeHighlighter (freeware)&lt;br /&gt;http://www.CodeHighlighter.com/&lt;br /&gt;&lt;br /&gt;--&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;Use&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt; AdventureWorks2008R2;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;Go&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #008080;&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color: #008080;&quot;&gt;-Insert data using SELECT INTO&lt;/span&gt;&lt;span style=&quot;color: #008080;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt; AddressLine1, City &lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;INTO&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt; BothellAddresses&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt; Person.Address &lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;where&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt; City  &lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;Bothell&lt;/span&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;GO&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #008080;&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color: #008080;&quot;&gt;-VERIFY DATA&lt;/span&gt;&lt;span style=&quot;color: #008080;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;Select&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt; AddressLine1, City&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt; BothellAddresses&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #008080;&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color: #008080;&quot;&gt;-DROP TABLE&lt;/span&gt;&lt;span style=&quot;color: #008080;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;DROP&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;TABLE&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt; BothellAddresses &lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;GO&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn&#39;s Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre class=&quot;csharpcode&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;span style=&quot;font-family: &#39;Arial&#39;,&#39;sans-serif&#39;; font-size: 9pt&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&amp;nbsp;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;p style=&quot;line-height: normal; margin: 0cm 0cm 0pt 17.85pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal&quot;&gt;&lt;span style=&quot;font-family: &#39;Arial&#39;,&#39;sans-serif&#39;; font-size: 9pt&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;2. INSERT INTO SELECT &lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style=&quot;line-height: normal; margin: 0cm 0cm 0pt 17.85pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &#39;Arial&#39;,&#39;sans-serif&#39;; font-size: 9pt&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;font size=&quot;2&quot;&gt;Below method will need table to be created prior to inserting data. Its really useful when table is already created and you want insert data from another table.&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;div style=&quot;padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px&quot; id=&quot;scid:9D7513F9-C04C-4721-824A-2B34F0212519:4b40cab1-0c29-4d38-a3b1-c79181726001&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;&lt;pre style=&quot; width: 510px; height: 295px;background-color:White;overflow: auto;&quot;&gt;&lt;div&gt;&lt;!--&lt;br /&gt;&lt;br /&gt;Code highlighting produced by Actipro CodeHighlighter (freeware)&lt;br /&gt;http://www.CodeHighlighter.com/&lt;br /&gt;&lt;br /&gt;--&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;Use&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt; AdventureWorks2008R2;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;Go&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #008080;&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color: #008080;&quot;&gt;-Create Table&lt;/span&gt;&lt;span style=&quot;color: #008080;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;TABLE&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt; BothellAddresses (AddressLine1 &lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;NVARCHAR&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #800000; font-weight: bold;&quot;&gt;60&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;), City &lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;NVARCHAR&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #800000; font-weight: bold;&quot;&gt;30&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;))&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #008080;&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color: #008080;&quot;&gt;-Insert into above table using SELECT&lt;/span&gt;&lt;span style=&quot;color: #008080;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;INTO&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt; BothellAddresses(AddressLine1, City)&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;  AddressLine1, City &lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt; Person.Address &lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;where&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt; City  &lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;Bothell&lt;/span&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #008080;&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color: #008080;&quot;&gt;-VERIFY DATA&lt;/span&gt;&lt;span style=&quot;color: #008080;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;Select&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt; AddressLine1, City&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt; BothellAddresses&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #008080;&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color: #008080;&quot;&gt;-DROP TABLE&lt;/span&gt;&lt;span style=&quot;color: #008080;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;DROP&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;TABLE&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt; BothellAddresses &lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;GO&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn&#39;s Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;ul&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;*The following limitations and restrictions apply to the INTO clause:&lt;/p&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;You cannot specify a table variable or table-valued parameter as the new table. &lt;br /&gt;&lt;li&gt;You cannot use SELECT…INTO to create a partitioned table, even when the source table is partitioned. SELECT...INTO does not use the partition scheme of the source table; instead, the new table is created in the default filegroup. To insert rows into a partitioned table, you must first create the partitioned table and then use the INSERT INTO...SELECT FROM statement. &lt;br /&gt;&lt;li&gt;When a computed column is included in the select list, the corresponding column in the new table is not a computed column. The values in the new column are the values that were computed at the time SELECT...INTO was executed. &lt;br /&gt;&lt;li&gt;SELECT...INTO cannot be used with COMPUTE. &lt;br /&gt;&lt;li&gt;The FILESTREAM attribute does not transfer to the new table. FILESTREAM BLOBs are copied and stored in the new table as varbinary(max) BLOBs. Without the FILESTREAM attribute, the varbinary(max) data type has a limitation of 2 GB. If a FILESTREAM BLOB exceeds this value, error 7119 is raised and the statement is stopped. &lt;br /&gt;&lt;li&gt;Indexes, constraints, and triggers defined in the source table are not transferred to the new table, nor can they be specified in the SELECT...INTO statement. If these objects are required, you must create them after executing the SELECT...INTO statement. &lt;br /&gt;&lt;li&gt;Specifying an ORDER BY clause does not guarantee the rows are inserted in the specified order.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;p&gt;* Source &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms188029(v=sql.100).aspx&quot; target=&quot;_blank&quot;&gt;Microsoft&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;div style=&quot;padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px&quot; id=&quot;scid:0767317B-992E-4b12-91E0-4F059A8CECA8:88935f7d-07d9-4541-898f-9b69eeeeffd8&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;Technorati Tags: &lt;a href=&quot;http://technorati.com/tags/Select+into&quot; rel=&quot;tag&quot;&gt;Select into&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/Insert+into&quot; rel=&quot;tag&quot;&gt;Insert into&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/Insert&quot; rel=&quot;tag&quot;&gt;Insert&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/Create+Table&quot; rel=&quot;tag&quot;&gt;Create Table&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/SQL&quot; rel=&quot;tag&quot;&gt;SQL&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/INTO&quot; rel=&quot;tag&quot;&gt;INTO&lt;/a&gt;&lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='http://blog.vspatel.co.uk/feeds/1189514366842409908/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6300224662881808865/1189514366842409908' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6300224662881808865/posts/default/1189514366842409908'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6300224662881808865/posts/default/1189514366842409908'/><link rel='alternate' type='text/html' href='http://blog.vspatel.co.uk/2012/02/select-into-table-insert-into-select.html' title='SELECT INTO TABLE – INSERT INTO SELECT Inserting data from from one table to another'/><author><name>Vishal Patel</name><uri>http://www.blogger.com/profile/09216439267443776160</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6300224662881808865.post-6196056611204690092</id><published>2012-02-22T22:34:00.000+00:00</published><updated>2012-02-23T13:13:35.633+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="2000"/><category scheme="http://www.blogger.com/atom/ns#" term="2005"/><category scheme="http://www.blogger.com/atom/ns#" term="2008"/><category scheme="http://www.blogger.com/atom/ns#" term="2008R2"/><category scheme="http://www.blogger.com/atom/ns#" term="Search"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Script"/><category scheme="http://www.blogger.com/atom/ns#" term="Stored Procedure"/><category scheme="http://www.blogger.com/atom/ns#" term="TSQL"/><category scheme="http://www.blogger.com/atom/ns#" term="View"/><title type='text'>How to get the stored procedure or views containing particular text from original SQL definition statements?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; line-height: 115%;&quot;&gt;How to get the stored procedure or views
containing particular text from original SQL definition statements?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;&quot;&gt;Here we using
following views.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify; text-justify: inter-ideograph;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;&quot;&gt;sys.syscomments&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;&quot;&gt; for SQL 2000 Compatibility -- &lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;&quot;&gt;Contains entries for each view, rule, default, trigger, CHECK
constraint, DEFAULT constraint, and stored procedure within the database. The &lt;strong&gt;text&lt;/strong&gt; column contains the
original SQL definition statements. For more information on sys.syscomments
please go to &lt;/span&gt;&lt;span style=&quot;color: #0070c0; font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;&quot;&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms186293%28v=sql.100%29.aspx&quot;&gt;http://msdn.microsoft.com/en-us/library/ms186293%28v=sql.100%29.aspx&lt;/a&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify; text-justify: inter-ideograph;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;&quot;&gt;Note:Microsoft recommend for
any furture development do not use sys.syscomments view instead use sys.sql_modules.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify; text-justify: inter-ideograph;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;&quot;&gt;sys.sql_modules&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;&quot;&gt; For SQL 2005/SQL 2008.-- &lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;&quot;&gt;Returns
a row for each object that is an SQL language-defined module.Objects of type P,
RF, V, TR, FN, IF, TF, and R have an associated SQL module. Stand-alone
defaults, objects of type D, also have an SQL module definition in this view.
For a description of these types, see the &lt;strong&gt;type&lt;/strong&gt; column in the &lt;/span&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms190324%28v=sql.100%29.aspx&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;&quot;&gt;sys.objects&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;&quot;&gt;catalog view for more information on sys.sql_modules
please go to &lt;/span&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms175081%28v=sql.100%29.aspx&quot;&gt;&lt;span style=&quot;color: #0070c0; font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;&quot;&gt;http://msdn.microsoft.com/en-us/library/ms175081%28v=sql.100%29.aspx&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify; text-justify: inter-ideograph;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;&quot;&gt;sys.sysobjects&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;&quot;&gt;: Contains one row for each object that is
created within a database, such as a constraint, default, log, rule, and stored
procedure. For information on sys.sysobjects please go to &lt;/span&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms177596.aspx&quot;&gt;&lt;span style=&quot;color: #0070c0; font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;&quot;&gt;http://msdn.microsoft.com/en-us/library/ms177596.aspx&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt; line-height: 115%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0cm 5.4pt 0cm 5.4pt; width: 231.05pt;&quot; valign=&quot;top&quot; width=&quot;462&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SQL 2000&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0cm 5.4pt 0cm 5.4pt; width: 231.05pt;&quot; valign=&quot;top&quot; width=&quot;462&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SQL 2005/SQL 2008&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; padding: 0cm 5.4pt 0cm 5.4pt; width: 231.05pt;&quot; valign=&quot;top&quot; width=&quot;462&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;--to get the stored procedures containing Product in code&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;br /&gt;
  &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;USE&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; AdventureWorks&lt;span style=&quot;color: grey;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;GO&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;select&lt;/span&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;--top 10 * &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;
  Procedurename &lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;textAS&lt;/span&gt;
  ProcedureCode&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;sys&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;syscomments&lt;/span&gt; sc&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;inner join&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;sys&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;sysobjects&lt;/span&gt; so &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;on&lt;/span&gt;
  sc&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;id &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; so&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;id&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;where&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;text&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;like&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;%Product%&#39;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;and&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; so&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;xtype &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;P&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-bottom-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-right-themecolor: text1; mso-border-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; padding: 0cm 5.4pt 0cm 5.4pt; width: 231.05pt;&quot; valign=&quot;top&quot; width=&quot;462&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;--to get the stored procedures containing Product in code&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;USE&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; AdventureWorks&lt;span style=&quot;color: grey;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;GO&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;select&lt;/span&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;--top 10 * &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;
  Procedurename &lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt; sc&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;[definition]
  &lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt; ProcedureCode&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;sys&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;sql_modules&lt;/span&gt; sc&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;inner join&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;sys&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;sysobjects&lt;/span&gt; so &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;on&lt;/span&gt;
  sc&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;object_id&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; so&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;id&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;where&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sc&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;[definition]
  &lt;span style=&quot;color: grey;&quot;&gt;like&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;%Product%&#39;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;and&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; so&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;xtype &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;P&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; padding: 0cm 5.4pt 0cm 5.4pt; width: 231.05pt;&quot; valign=&quot;top&quot; width=&quot;462&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;--to get the Views containing Address in code&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;USE&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; AdventureWorks&lt;span style=&quot;color: grey;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;GO&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;select&lt;/span&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;--top 10 * &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;
  Procedurename &lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;textAS&lt;/span&gt;
  ProcedureCode&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;sys&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;syscomments&lt;/span&gt; sc&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;inner join&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;sys&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;sysobjects&lt;/span&gt; so &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;on&lt;/span&gt;
  sc&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;id &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; so&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;id&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;where&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;text&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;like&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;%Address%&#39;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt; text-align: center;&quot;&gt;
&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;and&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; so&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;xtype &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;V&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-bottom-themecolor: text1; mso-border-left-alt: solid black .5pt; mso-border-left-themecolor: text1; mso-border-right-themecolor: text1; mso-border-themecolor: text1; mso-border-top-alt: solid black .5pt; mso-border-top-themecolor: text1; padding: 0cm 5.4pt 0cm 5.4pt; width: 231.05pt;&quot; valign=&quot;top&quot; width=&quot;462&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;--to get the Views containing Address in code&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;USE&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; AdventureWorks&lt;span style=&quot;color: grey;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;GO&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;select&lt;/span&gt;&lt;span style=&quot;color: green; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;--top 10 * &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;
  Procedurename &lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;sc&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;[definition]
  &lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt; ProcedureCode&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;sys&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;sql_modules&lt;/span&gt; sc&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;inner join&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;sys&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;sysobjects&lt;/span&gt; so &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;on&amp;nbsp;&lt;/span&gt;sc&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;object_id&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; so&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;id&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;where&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sc&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;[definition]
  &lt;span style=&quot;color: grey;&quot;&gt;like&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;%Address%&#39;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;and&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; so&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;xtype &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;V&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.vspatel.co.uk/feeds/6196056611204690092/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6300224662881808865/6196056611204690092' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6300224662881808865/posts/default/6196056611204690092'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6300224662881808865/posts/default/6196056611204690092'/><link rel='alternate' type='text/html' href='http://blog.vspatel.co.uk/2012/02/how-to-get-stored-procedure-or-views.html' title='How to get the stored procedure or views containing particular text from original SQL definition statements?'/><author><name>Balwant</name><uri>http://www.blogger.com/profile/15247139617050282380</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6300224662881808865.post-7121794740914135115</id><published>2012-02-20T18:11:00.000+00:00</published><updated>2012-02-20T18:14:44.308+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Cluster"/><category scheme="http://www.blogger.com/atom/ns#" term="P2V"/><category scheme="http://www.blogger.com/atom/ns#" term="SCVMM"/><category scheme="http://www.blogger.com/atom/ns#" term="Storage"/><title type='text'>P2V using SCVMM error&#39;s at select host screen because of disk space requirement</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
Have you ever seen below error while converting P2V using
SCVMM?&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Microsoft Sans Serif&#39;, sans-serif; font-size: 8.5pt;&quot;&gt;There is not enough disk space on the available volumes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Microsoft Sans Serif&#39;, sans-serif; font-size: 8.5pt;&quot;&gt;Maximum disk space on the most appropriate volume, accounting for the
host resource utilization&amp;nbsp; (in
megabytes): 60766 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Microsoft Sans Serif&#39;, sans-serif; font-size: 8.5pt;&quot;&gt;The virtual machine requirement (in megabytes): 162836 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Microsoft Sans Serif&#39;, sans-serif; font-size: 8.5pt;&quot;&gt;The maximum available space at the time of evaluation, after considering
the virtual machine requirements (in megabytes): 139290&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Microsoft Sans Serif&#39;, sans-serif; font-size: 8.5pt;&quot;&gt;ID: 3501&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;I was bit worried after seeing
error because currently I am having cluster server with more than 10 gigs of
free space and it’s always fine while creating new VM. You don’t need to worry
about above error because it simple to convert P2V if you are definitely sure
about free space on host. Go to below screen and press next after selecting
system drive only.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNG2mN_64W3exwui0BLzEyfpvFPWDHsfwEm1CQVvRMlqrt1nXML54JDhA8s_cscmQA9xM8kwU5v0dLurQr8dSWHeZt8ygVfY8rHXl7BZ6qJSQheeMxtwbhl0oDndG-ED8KP22GicK9yS4/s1600/Capture.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;337&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNG2mN_64W3exwui0BLzEyfpvFPWDHsfwEm1CQVvRMlqrt1nXML54JDhA8s_cscmQA9xM8kwU5v0dLurQr8dSWHeZt8ygVfY8rHXl7BZ6qJSQheeMxtwbhl0oDndG-ED8KP22GicK9yS4/s400/Capture.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
After selecting above continue
with wizard by pressing next till you reach last second tab \ option in wizard “Conversation
option”. Once you are there go back to above screen and select all drives that
you want to be in virtualised machine and then press “Conversion Information”
in the left side of the wizard and finally create to finish wizard. That’s all
you have to do if you get above error while converting Physical to Virtual using
SCVMM or Microsoft System Centre Virtual Machine Manager 2012.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.vspatel.co.uk/feeds/7121794740914135115/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6300224662881808865/7121794740914135115' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6300224662881808865/posts/default/7121794740914135115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6300224662881808865/posts/default/7121794740914135115'/><link rel='alternate' type='text/html' href='http://blog.vspatel.co.uk/2012/02/p2v-using-scvmm-errors-at-select-host.html' title='P2V using SCVMM error&#39;s at select host screen because of disk space requirement'/><author><name>Vishal Patel</name><uri>http://www.blogger.com/profile/09216439267443776160</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNG2mN_64W3exwui0BLzEyfpvFPWDHsfwEm1CQVvRMlqrt1nXML54JDhA8s_cscmQA9xM8kwU5v0dLurQr8dSWHeZt8ygVfY8rHXl7BZ6qJSQheeMxtwbhl0oDndG-ED8KP22GicK9yS4/s72-c/Capture.JPG" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6300224662881808865.post-1941026541603504186</id><published>2012-02-14T18:23:00.002+00:00</published><updated>2012-02-14T18:28:18.627+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Join"/><category scheme="http://www.blogger.com/atom/ns#" term="Update"/><title type='text'>Update query with JOIN</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;background: #FEFDFA; line-height: 13.5pt; margin-bottom: .0001pt; margin: 0cm; text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 13.5pt; margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 13.5pt; margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 13.5pt; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-size: 10pt;&quot;&gt;One of my colleague just asked me about update query with JOIN but as he
is new to SQL he tried to do exactly same as Select query and it was failing to
execute. There is little difference when you do UPDATE query with JOIN. He was
trying to execute below query and was not able to understand correct syntax of the query.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 13.5pt; margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 13.5pt; margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 13.5pt; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;UPDATE&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; Sales&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;SalesPerson &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; sp &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 13.5pt; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;INNER&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;JOIN&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp; Sales&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;SalesOrderHeader &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;AS &lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;so&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 13.5pt; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;ON&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; sp&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;BusinessEntityID &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;so&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;SalesPersonID&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 13.5pt; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;SET &lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;SalesYTD &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; SalesYTD &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;+ &lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;SubTotal&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 13.5pt; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;Where&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; sp&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;SalesPersonID &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 13.5pt; margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 13.5pt; margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 13.5pt; margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #333333; font-size: 10pt;&quot;&gt;Below is correct syntax for running UPDATE query with JOIN:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #333333; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 13.5pt; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;UPDATE&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; Sales&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;SalesPerson&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 13.5pt; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SET&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; SalesYTD &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;SalesYTD &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; SubTotal&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 13.5pt; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; Sales&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;SalesPerson &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; sp&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 13.5pt; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;JOIN&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; Sales&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;SalesOrderHeader &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; so&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 13.5pt; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;ON&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; sp&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;SalesPersonID&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; so&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;SalesPersonID&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 13.5pt; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;Where&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; sp&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;SalesPersonID &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 13.5pt; margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.vspatel.co.uk/feeds/1941026541603504186/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6300224662881808865/1941026541603504186' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6300224662881808865/posts/default/1941026541603504186'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6300224662881808865/posts/default/1941026541603504186'/><link rel='alternate' type='text/html' href='http://blog.vspatel.co.uk/2012/02/update-query-with-inner-join_14.html' title='Update query with JOIN'/><author><name>Vishal Patel</name><uri>http://www.blogger.com/profile/09216439267443776160</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>