<?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: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-7640660526231012016</id><updated>2011-11-27T16:42:23.662-08:00</updated><category term='Set based'/><category term='procedural approach in SQL'/><title type='text'>Kunal Rai's blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://kunalrai.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7640660526231012016/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://kunalrai.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>kunal</name><uri>http://www.blogger.com/profile/08148204133816588642</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-xRLvxPfMAgI/TcewMdK_rZI/AAAAAAAAAaE/0DGF7pXY2Hk/s220/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7640660526231012016.post-5180049760966510940</id><published>2011-09-16T11:42:00.000-07:00</published><updated>2011-09-16T11:42:26.883-07:00</updated><title type='text'>A Herd of programmers</title><content type='html'>&lt;div&gt;&lt;strong&gt;&lt;br /&gt;Cubicle after cubicle, arranged in long, dreary rows.&lt;br /&gt;A soul farm. The corporate drudgery of unrealistic&lt;br /&gt;schedules, bad management, and disastrous software.&lt;br /&gt;No natural light and awful coffee.&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;Welcome to the software factory.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7640660526231012016-5180049760966510940?l=kunalrai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kunalrai.blogspot.com/feeds/5180049760966510940/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7640660526231012016&amp;postID=5180049760966510940' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7640660526231012016/posts/default/5180049760966510940'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7640660526231012016/posts/default/5180049760966510940'/><link rel='alternate' type='text/html' href='http://kunalrai.blogspot.com/2011/09/herd-of-programmers.html' title='A Herd of programmers'/><author><name>kunal</name><uri>http://www.blogger.com/profile/08148204133816588642</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-xRLvxPfMAgI/TcewMdK_rZI/AAAAAAAAAaE/0DGF7pXY2Hk/s220/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7640660526231012016.post-2521706312947743515</id><published>2010-04-11T23:21:00.000-07:00</published><updated>2010-04-12T00:05:44.162-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='procedural approach in SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Set based'/><title type='text'>Set based approach vs procedural approach in sql</title><content type='html'>Perhaps we all have heard that “Set based approaches” are better than the “Procedural approaches” while writing data access routines in SQL. In this article, we will try to investigate the two mentioned approaches to understand why "Set based approaches" are better.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;What is a “procedural approach”?&lt;/span&gt;&lt;br /&gt;Procedural approach is actually the “programmatic approach” that we are used to work with. In this approach, we tell the system “what to do” and “how to do” it. We write the data operational and manipulation logics using looping, conditional and processing statements. The runtime does whatever we want it to do, however we want it to do.&lt;br /&gt;&lt;br /&gt;In TSQL, any User Defined Function (UDF), or Cursor that executes on a result set row by row is a procedural approach.&lt;br /&gt;&lt;br /&gt;What is a “Set based approach”?&lt;br /&gt;&lt;br /&gt;Set based approach is actually an approach which lets you specify “what to do”, but, does not let you specify “how to do”. That is, you just specify your requirement for set of data that has to be obtained from a “set of data” (Be it a simple table/view, or, joins of tables/views), filtered by optional condition(s). Sometimes, the specification of the “sets” you like to retrieve data from may be obtained by using complex joins/SubQuery/conditional case statements, but, at the end, there is a set of data from which the resultant set has to be obtained. You never have to specify “how” the data retrieval operation has to be implemented internally. You never have to specify how to implement the “joining operation” internally either. Also, you don’t have to specify how to apply filter condition against the rows. The database engine determines the best possible algorithms or processing logics to do these.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Why “Set based approach” is better than the “Procedural approach”?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The internal execution engine of databases are designed and optimized for taking “set based instructions” as input (SQLs) and executing these instructions in the best possible way (that varies based on lots of criteria) to produce output. For example, three types of joins are there in SQL server database. These are,&lt;br /&gt;&lt;br /&gt;--Merge join : Most optimized joining algorithm. Takes place when both tables are joined on indexed columns which are sorted.&lt;br /&gt;--Nested loop join : Moderate cost joining algorithm. Takes place when one of the table in the join clause contains small number of records comparing to the number of records in the other participating table.&lt;br /&gt;--Hash join : Most costly joining algorithm. Takes place when large, unsorted, non-indexed columns are used in the join condition.&lt;br /&gt;&lt;br /&gt;Now, whenever we specify any join predicate in any SQL, based upon the participating column nature and set (and, nature) of values in the participating columns, the SQL server determines and use the best possible joining algorithm and implement the logic to perform the actual joining operation in memory. Note that, we don’t have to specify the type of joining algorithm in the SQL. SQL server does that, and, does its best to provide the result as fast as possible.&lt;br /&gt;&lt;br /&gt;Another important fact is, whatever SQL written in “set based approach” is issued in the database, the query optimizer generates an execution plan first, and then, the execution engine executes the plan to retrieve data from the physical storage and to process output in an efficient manner. That is, there is a single execution plan tree for each single SQL statement be it simple or complex. Executing that single execution plan tree is generally a faster operation.&lt;br /&gt;&lt;br /&gt;But, when we specify our own way of processing a result set (That is obtained by an SQL) using another SQL in a row-by-row manner, the database engine has to execute an execution plan for each row. Imagine a row-by-row operation that is getting executed for a result set containing 1 million rows. In this case, the initial data retrieval operation would require one execution plan to be executed, and, later, 1 million times another execution plan has to be executed for processing each row. That’s what happens when a User Defined Function (UDF) is executed for each row in a result set. An additional overhead of using UDF is the amount of stack I/O that takes place for invoking the UDF.&lt;br /&gt;&lt;br /&gt;Also, if you use a Cursor to process a result set row-by-row, while executing, the Cursor locks the rows in the corresponding table and unlocks rows when processing done. This involves lots of resource usage on the server and in case of large result sets, this severely slows down performance.&lt;br /&gt;&lt;br /&gt;Experiment shows that, using a UDF for row-by-row operation involving up to 1000 rows may provide a performance that is within acceptable range. But, as the number of rows are increased, using UDF would result in dramatically slow performance. The same goes for cursors.&lt;br /&gt;&lt;br /&gt;That is why, “set based SQLs” always should outperform the “procedural SQLs”, specially, if the result set to process becomes large.&lt;br /&gt;&lt;br /&gt;OK, now, how to get rid of “Procedural SQLs”?&lt;br /&gt;&lt;br /&gt;Simple tricks:&lt;br /&gt;&lt;br /&gt;--Use inline sub queries to replace User Defined Functions.&lt;br /&gt;--Instead of a cursor, use a table variable to host result set and navigate table variable’s rows using a loop to process rows.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7640660526231012016-2521706312947743515?l=kunalrai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kunalrai.blogspot.com/feeds/2521706312947743515/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7640660526231012016&amp;postID=2521706312947743515' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7640660526231012016/posts/default/2521706312947743515'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7640660526231012016/posts/default/2521706312947743515'/><link rel='alternate' type='text/html' href='http://kunalrai.blogspot.com/2010/04/set-based-approach-vs-procedural.html' title='Set based approach vs procedural approach in sql'/><author><name>kunal</name><uri>http://www.blogger.com/profile/08148204133816588642</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-xRLvxPfMAgI/TcewMdK_rZI/AAAAAAAAAaE/0DGF7pXY2Hk/s220/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7640660526231012016.post-1512623100592576518</id><published>2008-10-13T22:36:00.000-07:00</published><updated>2008-10-13T22:38:33.602-07:00</updated><title type='text'>SQL Server Best practice</title><content type='html'>http://technet.microsoft.com/hi-in/sqlserver/bb331794(en-us).aspx&lt;a href="http://technet.microsoft.com/hi-in/sqlserver/bb331794(en-us).aspx"&gt;Go&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7640660526231012016-1512623100592576518?l=kunalrai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kunalrai.blogspot.com/feeds/1512623100592576518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7640660526231012016&amp;postID=1512623100592576518' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7640660526231012016/posts/default/1512623100592576518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7640660526231012016/posts/default/1512623100592576518'/><link rel='alternate' type='text/html' href='http://kunalrai.blogspot.com/2008/10/sql-server-best-practice.html' title='SQL Server Best practice'/><author><name>kunal</name><uri>http://www.blogger.com/profile/08148204133816588642</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-xRLvxPfMAgI/TcewMdK_rZI/AAAAAAAAAaE/0DGF7pXY2Hk/s220/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7640660526231012016.post-1037153504149761511</id><published>2008-10-09T21:24:00.000-07:00</published><updated>2008-10-09T21:29:04.821-07:00</updated><title type='text'>Temporary tables in SQL Server vs. table variables</title><content type='html'>When writing T-SQL code, you often need a table in which to store data temporarily when it comes time to execute that code. You have four table options: normal tables, local temporary tables, global temporary tables and table variables. I'll discuss the differences between using temporary tables in SQL Server versus table variables. Each of the four table options has its own purpose and use, and each has its benefits and issues:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Normal tables are exactly that, physical tables defined in your database. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Local temporary tables are temporary tables that are available only to the session that created them. These tables are automatically destroyed at the termination of the procedure or session that created them.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Global temporary tables are temporary tables that are available to all sessions and all users. They are dropped automatically when the last session using the temporary table has completed. Both local temporary tables and global temporary tables are physical tables created within the tempdb database.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Table variables are stored within memory but are laid out like a table. Table variables are partially stored on disk and partially stored in memory. It's a common misconception that table variables are stored only in memory. Because they are partially stored in memory, the access time for a table variable can be faster than the time it takes to access a temporary table.&lt;br /&gt;&lt;br /&gt;Creating indexes on SQL Server tables&lt;br /&gt;&lt;br /&gt;Because both local and global temporary tables are physical tables within the tempdb database, indexes can be created on these tables to increase performance as needed. As with any index creation, this process can take time on larger tables. Because temp tables are physical tables, you can also create a primary key on them via the CREATE TABLE command or via the ALTER TABLE command. You can use the ALTER TABLE command to add any defaults, new columns, or constraints that you need to within your code.&lt;br /&gt;&lt;br /&gt;Unlike local and global temporary tables, table variables cannot have indexes created on them. The exception is that table  &lt;br /&gt;More on SQL Server tables: &lt;br /&gt;FAQ: Creating and altering SQL Server tables &lt;br /&gt;&lt;br /&gt;Create private temp tables to execute same procedure&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;  &lt;br /&gt; &lt;br /&gt;variables can have a primary key defined upon creation using the DECLARE @variable TABLE command. This will then create a clustered or non-clustered index on the table variable. The CREATE INDEX command does not recognize table variables. Therefore, the only index available to you is the index that accompanies the primary key and is created upon table variable declaration.&lt;br /&gt;&lt;br /&gt;Changes to table variables in SQL 2005&lt;br /&gt;&lt;br /&gt;There are limitations on how you can use table variables. The limitations began changing with SQL Server 2005. Namely, table variables could not be used as the destination of an INSERT EXEC command such as&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;insert @variable&lt;br /&gt;exec sp_who&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Starting in SQL Server 2005, this limitation was removed and table variables can now be used as the destination for INSERT EXEC commands.&lt;br /&gt;&lt;br /&gt;Changes to table variables in SQL Server 2008&lt;br /&gt;&lt;br /&gt;Microsoft SQL Server 2008 introduces another important change to table variables. The latest SQL Server edition allows you to create a table variable as an input or output parameter of a stored procedure. An array of information can now be passed to a stored procedure without creating a string or XML block and then having to parse it out after executing the stored procedure. There are some restrictions on this however. The table variable parameter must be declared based on a table data type, and the variable must be read-only. When compared to not having this ability at all, these restrictions are minor inconveniences at best.&lt;br /&gt;&lt;br /&gt;In the below sample code, a user-defined table type is created and a stored procedure is then defined using this table type. A local variable is declared also using the table type, data is loaded into the variable and then the array of data is passed from the local variable to the input parameter where the records are used within the stored procedure. Here is an example:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;create type tt_example AS TABLE&lt;br /&gt; (spid int)&lt;br /&gt;go&lt;br /&gt;create procedure usp_example&lt;br /&gt; @spids tt_example READONLY&lt;br /&gt;AS&lt;br /&gt; SELECT *&lt;br /&gt; FROM @spids&lt;br /&gt;GO&lt;br /&gt;declare @spids tt_example&lt;br /&gt;&lt;br /&gt;insert into @spids&lt;br /&gt;select top 10 spid&lt;br /&gt;from sys.sysprocesses&lt;br /&gt;&lt;br /&gt;exec usp_example @spids=@spids&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How do the internal workings of SQL Server perform differently between table variables and temporary tables?&lt;br /&gt;&lt;br /&gt;The differences between accessing tables and variables cause the internal processes within SQL Server to treat the objects quite differently. Temporary tables are actually physical tables, so the SQL Optimizer and locking engine handle the tables just as they would any other database tables. Because reads to a temporary table are made (including local temporary tables), a read lock is placed on the table.&lt;br /&gt;&lt;br /&gt;This locking process takes time and CPU resources. When reading from a table variable – because the table variable is stored partially within memory and cannot be accessed by any other user or process on the system – SQL Server knows locking is not required. In a very busy database, this lack of locking can improve system performance because locks do not have to be taken, escalated and checked for each data access operation.&lt;br /&gt;&lt;br /&gt;Limits of temporary tables and table variables&lt;br /&gt;&lt;br /&gt;Temporary tables and table variables both have their strengths, but they both have weaknesses too. On a heavy load system that has lots of usage of temporary tables, the disk array servicing the tempdb database will experience a higher than expected load. This happens because all reads and writes to the temporary tables are done within the tempdb database. Table variables will perform poorly with large record sets, especially when doing joins because there can be no indexes other than a primary key. Beware, though, when many users start using table variables -- large amounts of RAM are used because all temporary tables are stored and processed directly in memory. Table variables should hold no more than 2 Megs to 3 Megs of data each (depending on user load and system memory).&lt;br /&gt;&lt;br /&gt;Both temporary tables and table variables can be extremely useful tools in developers' and administrators' arsenals; however, care must be taken as to when to use each solution. There is no end-all solution, and you must choose the correct solution for the correct situation.&lt;br /&gt;&lt;br /&gt;All information provided about Microsoft SQL Server 2008 (Katmai) is based on beta edition 10.0.1019 of the software and is subject to change without notice.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7640660526231012016-1037153504149761511?l=kunalrai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kunalrai.blogspot.com/feeds/1037153504149761511/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7640660526231012016&amp;postID=1037153504149761511' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7640660526231012016/posts/default/1037153504149761511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7640660526231012016/posts/default/1037153504149761511'/><link rel='alternate' type='text/html' href='http://kunalrai.blogspot.com/2008/10/temporary-tables-in-sql-server-vs-table.html' title='Temporary tables in SQL Server vs. table variables'/><author><name>kunal</name><uri>http://www.blogger.com/profile/08148204133816588642</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-xRLvxPfMAgI/TcewMdK_rZI/AAAAAAAAAaE/0DGF7pXY2Hk/s220/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7640660526231012016.post-6504133956227226866</id><published>2008-10-07T05:13:00.000-07:00</published><updated>2008-10-07T05:13:32.139-07:00</updated><title type='text'>DeploymentEngineering.com - The Blog: Multiple Instance MSI's and InstallShield 12</title><content type='html'>&lt;a href="http://blog.deploymentengineering.com/2006/10/multiple-instance-msis-and.html"&gt;DeploymentEngineering.com - The Blog: Multiple Instance MSI&amp;#39;s and InstallShield 12&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7640660526231012016-6504133956227226866?l=kunalrai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://blog.deploymentengineering.com/2006/10/multiple-instance-msis-and.html' title='DeploymentEngineering.com - The Blog: Multiple Instance MSI&apos;s and InstallShield 12'/><link rel='replies' type='application/atom+xml' href='http://kunalrai.blogspot.com/feeds/6504133956227226866/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7640660526231012016&amp;postID=6504133956227226866' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7640660526231012016/posts/default/6504133956227226866'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7640660526231012016/posts/default/6504133956227226866'/><link rel='alternate' type='text/html' href='http://kunalrai.blogspot.com/2008/10/deploymentengineeringcom-blog-multiple.html' title='DeploymentEngineering.com - The Blog: Multiple Instance MSI&apos;s and InstallShield 12'/><author><name>kunal</name><uri>http://www.blogger.com/profile/08148204133816588642</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-xRLvxPfMAgI/TcewMdK_rZI/AAAAAAAAAaE/0DGF7pXY2Hk/s220/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7640660526231012016.post-325728909629034653</id><published>2008-10-07T04:58:00.000-07:00</published><updated>2008-10-07T05:00:14.787-07:00</updated><title type='text'>Installing multiple instance of product using wix</title><content type='html'>At my last job, I was responsible for build and install for a single tenant SaaS system that consisted of ASP.NET WebServices, WinUI and WebUI clients. This system lent itself to needing the ability to have different versions installed in parallel with different configuration options. At the time, InstallShield 12 had the ability to generate and embed product code changing multiple instance transforms but the bootstrapper lacked the ability to service these instances. As a result I authored a custom bootstrapper that interacted with the MSI API and simple reflection against the MSI database to connect the pieces into a solution that looked very much like InstallScripts multiple instance support. In fact I wrote about this on my blog: &lt;a href="http://blog.deploymentengineering.com/2006/10/multiple-instance-msis-and.html"&gt;Multiple Instance MSI's and InstallShield 12&lt;/a&gt;. This blog article has continued to be very popular among my visitors.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7640660526231012016-325728909629034653?l=kunalrai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kunalrai.blogspot.com/feeds/325728909629034653/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7640660526231012016&amp;postID=325728909629034653' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7640660526231012016/posts/default/325728909629034653'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7640660526231012016/posts/default/325728909629034653'/><link rel='alternate' type='text/html' href='http://kunalrai.blogspot.com/2008/10/installing-multiple-instance-of-product.html' title='Installing multiple instance of product using wix'/><author><name>kunal</name><uri>http://www.blogger.com/profile/08148204133816588642</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-xRLvxPfMAgI/TcewMdK_rZI/AAAAAAAAAaE/0DGF7pXY2Hk/s220/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7640660526231012016.post-3894103943126174125</id><published>2008-10-05T23:10:00.000-07:00</published><updated>2008-10-05T23:13:06.102-07:00</updated><title type='text'>Orca install package</title><content type='html'>Stephane Rodriguez posted an interesting comment that I hadn't thought of - it isn't the easiest thing in the world to download Orca.  You have to go through the Platform SDK web-based installer tool and also install a bunch of pieces of the core SDK to get orca.msi which lets you install Orca.  I have a copy of it that I downloaded and posted at &lt;a href="http://astebner.sts.winisp.net/Tools/Orca.zip"&gt;http://astebner.sts.winisp.net/Tools/Orca.zip&lt;/a&gt; for easier access.  I hope this makes things easier for you as you debug your setup packages.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7640660526231012016-3894103943126174125?l=kunalrai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kunalrai.blogspot.com/feeds/3894103943126174125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7640660526231012016&amp;postID=3894103943126174125' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7640660526231012016/posts/default/3894103943126174125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7640660526231012016/posts/default/3894103943126174125'/><link rel='alternate' type='text/html' href='http://kunalrai.blogspot.com/2008/10/orca-install-package.html' title='Orca install package'/><author><name>kunal</name><uri>http://www.blogger.com/profile/08148204133816588642</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-xRLvxPfMAgI/TcewMdK_rZI/AAAAAAAAAaE/0DGF7pXY2Hk/s220/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7640660526231012016.post-5829589603374904174</id><published>2007-12-25T20:19:00.000-08:00</published><updated>2007-12-25T20:25:50.699-08:00</updated><title type='text'>Parsing XML in SQL2005</title><content type='html'>DECLARE @docHandle int&lt;br /&gt;DECLARE @xmlDocument nvarchar(max) -- or xml type&lt;br /&gt;SET @xmlDocument = N'&lt;parameters&gt;&lt;br /&gt;&lt;parameter name="Test"&gt;ABC123&lt;/parameter&gt;&lt;br /&gt;&lt;parameter name="Test2"&gt;ABC1233232&lt;/parameter&gt;&lt;br /&gt;&lt;/parameters&gt;'&lt;br /&gt;EXEC sp_xml_preparedocument @docHandle OUTPUT, @xmlDocument&lt;br /&gt;-- Use OPENXML to provide rowset consisting of customer data.&lt;br /&gt;--INSERT Customers&lt;br /&gt;&lt;br /&gt;declare @Test nvarchar(10)&lt;br /&gt;declare @Test2 nvarchar(10)&lt;br /&gt;&lt;br /&gt;SELECT @Test=text&lt;br /&gt;FROM OPENXML(@docHandle, N'/Parameters/Parameter[@name=''Test'']/text()')&lt;br /&gt;&lt;br /&gt;SELECT @Test2=text&lt;br /&gt;FROM OPENXML(@docHandle, N'/Parameters/Parameter[@name=''Test2'']/text()')&lt;br /&gt;&lt;br /&gt;print @Test&lt;br /&gt;print @Test2&lt;br /&gt;&lt;br /&gt;-- WITH Customers&lt;br /&gt;-- Use OPENXML to provide rowset consisting of order data.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7640660526231012016-5829589603374904174?l=kunalrai.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kunalrai.blogspot.com/feeds/5829589603374904174/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7640660526231012016&amp;postID=5829589603374904174' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7640660526231012016/posts/default/5829589603374904174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7640660526231012016/posts/default/5829589603374904174'/><link rel='alternate' type='text/html' href='http://kunalrai.blogspot.com/2007/12/parsing-xml-in-sql2005.html' title='Parsing XML in SQL2005'/><author><name>kunal</name><uri>http://www.blogger.com/profile/08148204133816588642</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-xRLvxPfMAgI/TcewMdK_rZI/AAAAAAAAAaE/0DGF7pXY2Hk/s220/photo.jpg'/></author><thr:total>0</thr:total></entry></feed>
