<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>treasure4developer</title>
	<atom:link href="http://treasure4developer.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://treasure4developer.wordpress.com</link>
	<description>Just another Wordpress.com weblog</description>
	<lastBuildDate>Sun, 12 Jul 2009 15:13:36 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='treasure4developer.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/2c7ab6fd4c25ed33cddea807de5b1835?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>treasure4developer</title>
		<link>http://treasure4developer.wordpress.com</link>
	</image>
			<item>
		<title>What are the difference between DDL, DML and DCL commands?</title>
		<link>http://treasure4developer.wordpress.com/2009/07/12/what-are-the-difference-between-ddl-dml-and-dcl-commands/</link>
		<comments>http://treasure4developer.wordpress.com/2009/07/12/what-are-the-difference-between-ddl-dml-and-dcl-commands/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 15:13:36 +0000</pubDate>
		<dc:creator>treasure4developer</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[DCL]]></category>
		<category><![CDATA[DDL]]></category>
		<category><![CDATA[DML]]></category>
		<category><![CDATA[SQL Commands]]></category>
		<category><![CDATA[sql definations]]></category>

		<guid isPermaLink="false">http://treasure4developer.wordpress.com/?p=69</guid>
		<description><![CDATA[
What are the difference between DDL, DML and DCL commands?
DDL &#8211; Data Definition Language: statements used to define the database structure or schema. Some examples:

CREATE &#8211; to create objects in      the database
ALTER &#8211; alters the structure      of the database
DROP &#8211; delete objects from   [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=treasure4developer.wordpress.com&blog=209000&post=69&subd=treasure4developer&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><!--[if gte mso 9]&gt;  Normal 0   false false false        MicrosoftInternetExplorer4  &lt;![endif]--><!--[if gte mso 9]&gt;   &lt;![endif]--></p>
<h2><span class="mw-headline">What are the difference between DDL, DML and DCL commands?</span></h2>
<p><strong>DDL</strong> &#8211; Data Definition Language: statements used to define the database structure or schema. Some examples:</p>
<ul type="disc">
<li class="MsoNormal">CREATE &#8211; to create objects in      the database</li>
<li class="MsoNormal">ALTER &#8211; alters the structure      of the database</li>
<li class="MsoNormal">DROP &#8211; delete objects from      the database</li>
<li class="MsoNormal">TRUNCATE &#8211; remove all records      from a table, including all spaces allocated for the records are removed</li>
<li class="MsoNormal">COMMENT &#8211; add comments to the      data dictionary</li>
<li class="MsoNormal">RENAME &#8211; rename an object</li>
</ul>
<p class="MsoNormal">
<p class="MsoNormal">They are called Data Definition since they are used for defining the data. That is the structure of the data is known through these DDL commands.</p>
<p><span> </span></p>
<p class="MsoNormal">
<p><strong>DML</strong> &#8211; Data Manipulation Language: statements used for managing data within schema objects. Some examples:</p>
<ul type="disc">
<li class="MsoNormal">SELECT &#8211; retrieve data from      the a database</li>
<li class="MsoNormal">INSERT &#8211; insert data into a      table</li>
<li class="MsoNormal">UPDATE &#8211; updates existing      data within a table</li>
<li class="MsoNormal">DELETE &#8211; deletes all records      from a table, the space for the records remain</li>
<li class="MsoNormal">MERGE &#8211; UPSERT operation      (insert or update)</li>
<li class="MsoNormal">CALL &#8211; call a PL/SQL or Java      subprogram</li>
<li class="MsoNormal">EXPLAIN PLAN &#8211; explain access      path to data</li>
<li class="MsoNormal">LOCK TABLE &#8211; control      concurrency</li>
</ul>
<p class="MsoNormal">DML commands are used for data manipulation. Some of the DML commands<br />
insert,select,update,delete etc. Even though select is not exactly a DML language command oracle still recommends you to consider SELECT as an DML command.</p>
<p>DML are not auto-commit. i.e. you can roll-back the operations, but DDL are auto-commit</p>
<p><strong> </strong></p>
<p><strong>DCL</strong> &#8211; Data Control Language. Some examples:</p>
<ul type="disc">
<li class="MsoNormal">GRANT &#8211; gives user&#8217;s access      privileges to database</li>
<li class="MsoNormal">REVOKE &#8211; withdraw access      privileges given with the GRANT command</li>
</ul>
<p class="MsoNormal">
<p class="MsoNormal">Data Control Language is used for the control of data. That is a user can access any data based on the priveleges given to him. This is done through DATA CONTROL</p>
<p class="MsoNormal">It is used to create roles, permissions, and referential integrity as well it is used to control access to database by securing it.</p>
<p><strong>TCL</strong> &#8211; Transaction Control: statements used to manage the changes made by DML statements. It allows statements to be grouped together into logical transactions.</p>
<ul type="disc">
<li class="MsoNormal">COMMIT &#8211; save work done</li>
<li class="MsoNormal">SAVEPOINT &#8211; identify a point      in a transaction to which you can later roll back</li>
<li class="MsoNormal">ROLLBACK &#8211; restore database      to original since the last COMMIT</li>
<li class="MsoNormal">SET TRANSACTION &#8211; Change      transaction options like isolation level and what rollback segment to use</li>
</ul>
<p>For revoking the transactions and to make the data commit to the database we use TCL. <span> </span><br />
<span> </span><br />
Once we commit we cannot rollback. Once we rollback we cannot commit.<br />
<!--[if !supportLineBreakNewLine]--><br />
<!--[endif]--></p>
<p>Commit and Rollback are generally used to commit or revoke the transactions that are with regard to DML commands.</p>
<p class="MsoNormal">
<h2>Source: From different sql experts from internet</h2>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/treasure4developer.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/treasure4developer.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/treasure4developer.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/treasure4developer.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/treasure4developer.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/treasure4developer.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/treasure4developer.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/treasure4developer.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/treasure4developer.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/treasure4developer.wordpress.com/69/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=treasure4developer.wordpress.com&blog=209000&post=69&subd=treasure4developer&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://treasure4developer.wordpress.com/2009/07/12/what-are-the-difference-between-ddl-dml-and-dcl-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f1e6ec2ad4c3e6b732095751bf6a0227?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">treasure4developer</media:title>
		</media:content>
	</item>
		<item>
		<title>javascript value in server side variable</title>
		<link>http://treasure4developer.wordpress.com/2009/02/25/javascript-value-in-server-side-variable/</link>
		<comments>http://treasure4developer.wordpress.com/2009/02/25/javascript-value-in-server-side-variable/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 11:35:49 +0000</pubDate>
		<dc:creator>treasure4developer</dc:creator>
				<category><![CDATA[ASP.NET & C#]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[code behind]]></category>

		<guid isPermaLink="false">http://treasure4developer.wordpress.com/?p=75</guid>
		<description><![CDATA[You can get variable from javascript and use it in code behind code in dotnet variable it means server side variable.
Dim strMessage2 As String = &#8220;&#8221;
       Response.Write(&#8220;var str1 =
prompt(&#8216;Please Enter Password:&#8217;,&#8221;);&#8221;)
       strMessage2 = &#8220;document.write(str1);&#8221;
       Response.Write(strMessage2)
   [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=treasure4developer.wordpress.com&blog=209000&post=75&subd=treasure4developer&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>You can get variable from javascript and use it in code behind code in dotnet variable it means server side variable.</p>
<p>Dim strMessage2 As String = &#8220;&#8221;</p>
<p>       Response.Write(&#8220;var str1 =<br />
prompt(&#8216;Please Enter Password:&#8217;,&#8221;);&#8221;)</p>
<p>       strMessage2 = &#8220;document.write(str1);&#8221;</p>
<p>       Response.Write(strMessage2)</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/treasure4developer.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/treasure4developer.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/treasure4developer.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/treasure4developer.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/treasure4developer.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/treasure4developer.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/treasure4developer.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/treasure4developer.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/treasure4developer.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/treasure4developer.wordpress.com/75/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=treasure4developer.wordpress.com&blog=209000&post=75&subd=treasure4developer&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://treasure4developer.wordpress.com/2009/02/25/javascript-value-in-server-side-variable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f1e6ec2ad4c3e6b732095751bf6a0227?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">treasure4developer</media:title>
		</media:content>
	</item>
		<item>
		<title>Good question banks for technical interview</title>
		<link>http://treasure4developer.wordpress.com/2009/02/25/good-question-banks-for-technical-interview/</link>
		<comments>http://treasure4developer.wordpress.com/2009/02/25/good-question-banks-for-technical-interview/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 06:34:34 +0000</pubDate>
		<dc:creator>treasure4developer</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[interview]]></category>
		<category><![CDATA[question]]></category>
		<category><![CDATA[questions]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[URL]]></category>

		<guid isPermaLink="false">http://treasure4developer.wordpress.com/2009/02/25/good-question-banks-for-technical-interview/</guid>
		<description><![CDATA[http://stackoverflow.com/questions/tagged/index
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=treasure4developer.wordpress.com&blog=209000&post=74&subd=treasure4developer&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>http://stackoverflow.com/questions/tagged/index</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/treasure4developer.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/treasure4developer.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/treasure4developer.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/treasure4developer.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/treasure4developer.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/treasure4developer.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/treasure4developer.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/treasure4developer.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/treasure4developer.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/treasure4developer.wordpress.com/74/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=treasure4developer.wordpress.com&blog=209000&post=74&subd=treasure4developer&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://treasure4developer.wordpress.com/2009/02/25/good-question-banks-for-technical-interview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f1e6ec2ad4c3e6b732095751bf6a0227?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">treasure4developer</media:title>
		</media:content>
	</item>
		<item>
		<title>Some really usefull Short keys in SQL</title>
		<link>http://treasure4developer.wordpress.com/2009/02/14/some-really-usefull-short-keys-in-sql/</link>
		<comments>http://treasure4developer.wordpress.com/2009/02/14/some-really-usefull-short-keys-in-sql/#comments</comments>
		<pubDate>Sat, 14 Feb 2009 07:45:33 +0000</pubDate>
		<dc:creator>treasure4developer</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[short keys]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[utilities]]></category>

		<guid isPermaLink="false">http://treasure4developer.wordpress.com/2009/02/14/some-really-usefull-short-keys-in-sql/</guid>
		<description><![CDATA[Some really usefull Short keys in SQL
Next Page F6
previous Pane Shift F6
Hide/Show Result Pane CTRL R
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=treasure4developer.wordpress.com&blog=209000&post=73&subd=treasure4developer&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Some really usefull Short keys in SQL<br />
Next Page F6<br />
previous Pane Shift F6<br />
Hide/Show Result Pane CTRL R</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/treasure4developer.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/treasure4developer.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/treasure4developer.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/treasure4developer.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/treasure4developer.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/treasure4developer.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/treasure4developer.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/treasure4developer.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/treasure4developer.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/treasure4developer.wordpress.com/73/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=treasure4developer.wordpress.com&blog=209000&post=73&subd=treasure4developer&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://treasure4developer.wordpress.com/2009/02/14/some-really-usefull-short-keys-in-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f1e6ec2ad4c3e6b732095751bf6a0227?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">treasure4developer</media:title>
		</media:content>
	</item>
		<item>
		<title>Charindex, small functionality but usefull</title>
		<link>http://treasure4developer.wordpress.com/2008/10/14/charindex-small-functionality-but-usefull/</link>
		<comments>http://treasure4developer.wordpress.com/2008/10/14/charindex-small-functionality-but-usefull/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 13:22:00 +0000</pubDate>
		<dc:creator>treasure4developer</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[charindex]]></category>
		<category><![CDATA[comma]]></category>

		<guid isPermaLink="false">http://treasure4developer.wordpress.com/?p=59</guid>
		<description><![CDATA[CHARINDEX (Transact-SQL)
 
 
Searches expression2 for expression1 and returns its starting position if found. The search starts at start_location.
Few good scripts with charindex
select CHARINDEX(&#8216;a&#8217;, &#8216;india&#8217;)
&#8211;result will be 5
select CHARINDEX( &#8216;,1,&#8217; ,&#8217;,1,2,3,&#8217;)
&#8211; result would be 3
DECLARE @selectedID VARCHAR(10)
SET @selectedID = &#8216;1,2&#8242;
&#8211;SET @selectedID = &#8216;1,5&#8242;
Some times we have to pass comma seprated value to sp and have [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=treasure4developer.wordpress.com&blog=209000&post=59&subd=treasure4developer&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><div class="title">CHARINDEX (Transact-SQL)</div>
<p><!--Content type: DocStudio. Transform: devdiv2mtps.xslt.--><span style="color:darkgray;"> </span></p>
<p><span> </span></p>
<p>Searches <em>expression2</em> for <em>expression1</em> and returns its starting position if found. The search starts at <em>start_location</em>.</p>
<p>Few good scripts with charindex</p>
<p>select CHARINDEX(&#8216;a&#8217;, &#8216;india&#8217;)</p>
<p>&#8211;result will be 5</p>
<p>select CHARINDEX( &#8216;,1,&#8217; ,&#8217;,1,2,3,&#8217;)<br />
&#8211; result would be 3<br />
DECLARE @selectedID VARCHAR(10)<br />
SET @selectedID = &#8216;1,2&#8242;<br />
&#8211;SET @selectedID = &#8216;1,5&#8242;</p>
<p>Some times we have to pass comma seprated value to sp and have to cross check with table data, its good script here.</p>
<p>it would give you all records which are passed in parameter @selectedID.</p>
<p>DECLARE @t AS TABLE (tID INT)<br />
INSERT INTO @t VALUES (1)<br />
INSERT INTO @t VALUES (2)<br />
INSERT INTO @t VALUES (3)</p>
<p>SELECT * FROM @t<br />
WHERE  CHARINDEX(&#8216;,&#8217; + CONVERT(VARCHAR(5),tID) + &#8216;,&#8217;, &#8216;,&#8217; + @selectedID + &#8216;,&#8217;) &gt; 0</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/treasure4developer.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/treasure4developer.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/treasure4developer.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/treasure4developer.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/treasure4developer.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/treasure4developer.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/treasure4developer.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/treasure4developer.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/treasure4developer.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/treasure4developer.wordpress.com/59/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=treasure4developer.wordpress.com&blog=209000&post=59&subd=treasure4developer&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://treasure4developer.wordpress.com/2008/10/14/charindex-small-functionality-but-usefull/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f1e6ec2ad4c3e6b732095751bf6a0227?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">treasure4developer</media:title>
		</media:content>
	</item>
		<item>
		<title>basics of SQL Server Transaction Isolation Levels</title>
		<link>http://treasure4developer.wordpress.com/2008/10/10/basics-of-sql-server-transaction-isolation-levels/</link>
		<comments>http://treasure4developer.wordpress.com/2008/10/10/basics-of-sql-server-transaction-isolation-levels/#comments</comments>
		<pubDate>Fri, 10 Oct 2008 10:44:53 +0000</pubDate>
		<dc:creator>treasure4developer</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[transaction levels]]></category>

		<guid isPermaLink="false">http://treasure4developer.wordpress.com/?p=63</guid>
		<description><![CDATA[I read one good article about sql server &#8211; transaction isolation level..
You might like it
Articl Summary: This post discusses the basics of SQL Server Transaction Isolation Levels.
http://www.sqlserverandxml.com/2008/08/introduction-to-sql-server-transaction.html
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=treasure4developer.wordpress.com&blog=209000&post=63&subd=treasure4developer&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I read one good article about sql server &#8211; transaction isolation level..</p>
<p>You might like it</p>
<p>Articl Summary: This post discusses the basics of SQL Server Transaction Isolation Levels.</p>
<p>http://www.sqlserverandxml.com/2008/08/introduction-to-sql-server-transaction.html</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/treasure4developer.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/treasure4developer.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/treasure4developer.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/treasure4developer.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/treasure4developer.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/treasure4developer.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/treasure4developer.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/treasure4developer.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/treasure4developer.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/treasure4developer.wordpress.com/63/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=treasure4developer.wordpress.com&blog=209000&post=63&subd=treasure4developer&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://treasure4developer.wordpress.com/2008/10/10/basics-of-sql-server-transaction-isolation-levels/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f1e6ec2ad4c3e6b732095751bf6a0227?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">treasure4developer</media:title>
		</media:content>
	</item>
		<item>
		<title>Basics of query process</title>
		<link>http://treasure4developer.wordpress.com/2008/08/06/basics-of-query-process/</link>
		<comments>http://treasure4developer.wordpress.com/2008/08/06/basics-of-query-process/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 13:51:40 +0000</pubDate>
		<dc:creator>treasure4developer</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[Basics of Query Process]]></category>

		<guid isPermaLink="false">http://treasure4developer.wordpress.com/?p=49</guid>
		<description><![CDATA[i have read one good blog which explains basics of query process.  Here is the order in which query operators are evaluated. There are 11 levels.
1. FROM
2. ON
3. JOIN
4. WHERE
5. GROUP BY
6. WITH{CUBE &#124; ROLLUP}
7. HAVING
8. SELECT
9. DISTINCT
10. HAVING
11. TOP
First the query processor reads all the rows from the FROM the left table and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=treasure4developer.wordpress.com&blog=209000&post=49&subd=treasure4developer&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>i have read one good blog which explains basics of query process.  Here is the order in which query operators are evaluated. There are 11 levels.</p>
<p>1. <span class="csharpcode"><span class="kwrd">FROM</span></span><br />
2. <span class="csharpcode"><span class="kwrd">ON</span></span><br />
3. <span class="csharpcode"><span class="kwrd">JOIN</span></span><br />
4. <span class="csharpcode"><span class="kwrd">WHERE</span></span><br />
5. <span class="csharpcode"><span class="kwrd">GROUP BY</span></span><br />
6. <span class="csharpcode"><span class="kwrd">WITH{CUBE | ROLLUP}</span></span><br />
7. <span class="csharpcode"><span class="kwrd">HAVING</span></span><br />
8. <span class="csharpcode"><span class="kwrd">SELECT</span></span><br />
9. <span class="csharpcode"><span class="kwrd">DISTINCT</span></span><br />
10. <span class="csharpcode"><span class="kwrd">HAVING</span></span><br />
11. <span class="csharpcode"><span class="kwrd">TOP</span></span></p>
<p>First the query processor reads all the rows from the <span class="csharpcode"><span class="kwrd">FROM</span></span> the left table and apply the <span class="csharpcode"><span class="kwrd">ON</span></span> condition with the right table provided in <span class="csharpcode"><span class="kwrd">JOIN</span></span>.</p>
<p>If there are more <span class="csharpcode"><span class="kwrd">JOIN</span></span>s the same is done for all the <span class="csharpcode"><span class="kwrd">JOIN</span></span>s.</p>
<p>Then the <span class="csharpcode"><span class="kwrd">WHERE</span></span> clause is applied to filter rows.</p>
<p>Then <span class="csharpcode"><span class="kwrd">GROUP BY</span></span> is done</p>
<p>There <span class="csharpcode"><span class="kwrd">WITH</span></span> clause get evaluated followed by <span class="csharpcode"><span class="kwrd">HAVING</span></span>.</p>
<p>Then the columns are selected. (<strong>This is the reason why you cannot use a column alias in <span class="csharpcode"><span class="kwrd">WHERE</span></span> or <span class="csharpcode"><span class="kwrd">GROUP BY</span></span></strong>)</p>
<p>Then <span class="csharpcode"><span class="kwrd">DISTINCT</span></span> clause applied</p>
<p>Then <span class="csharpcode"><span class="kwrd">ORDER BY</span></span> is processed&#8230;(<strong>This is the reason why you CAN use a column alias in the <span class="csharpcode"><span class="kwrd">ORDER BY</span></span> clause</strong>)</p>
<p>Then <span class="csharpcode"><span class="kwrd">TOP</span></span> clause get evaluated.</p>
<p>SOURCE : http://knowledgebaseworld.blogspot.com/2008/07/query-operators-evaluation.html</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/treasure4developer.wordpress.com/49/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/treasure4developer.wordpress.com/49/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/treasure4developer.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/treasure4developer.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/treasure4developer.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/treasure4developer.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/treasure4developer.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/treasure4developer.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/treasure4developer.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/treasure4developer.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/treasure4developer.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/treasure4developer.wordpress.com/49/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=treasure4developer.wordpress.com&blog=209000&post=49&subd=treasure4developer&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://treasure4developer.wordpress.com/2008/08/06/basics-of-query-process/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f1e6ec2ad4c3e6b732095751bf6a0227?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">treasure4developer</media:title>
		</media:content>
	</item>
		<item>
		<title>Calling postback event from Javascript</title>
		<link>http://treasure4developer.wordpress.com/2008/06/23/calling-postback-event-from-javascript/</link>
		<comments>http://treasure4developer.wordpress.com/2008/06/23/calling-postback-event-from-javascript/#comments</comments>
		<pubDate>Mon, 23 Jun 2008 11:19:33 +0000</pubDate>
		<dc:creator>treasure4developer</dc:creator>
				<category><![CDATA[ASP.NET & C#]]></category>
		<category><![CDATA[GetPostBackEventReference]]></category>
		<category><![CDATA[__dopostback]]></category>

		<guid isPermaLink="false">http://treasure4developer.wordpress.com/?p=46</guid>
		<description><![CDATA[SOURCE : http://www.dotnetspider.com/resources/1521-How-call-Postback-from-Javascript.aspx
Introduction
Postback is a concept introduced in ASP.NET and is a very handy method. Postback is built into the ASP.NET and most of the web controls support it without writing any code.
Calling postback event from Javascript
There may be some scenario where you may want to explicitly postback to the server using some clientside javascript. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=treasure4developer.wordpress.com&blog=209000&post=46&subd=treasure4developer&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>SOURCE : http://www.dotnetspider.com/resources/1521-How-call-Postback-from-Javascript.aspx</p>
<h2>Introduction</h2>
<p>Postback is a concept introduced in ASP.NET and is a very handy method. Postback is built into the ASP.NET and most of the web controls support it without writing any code.</p>
<h2>Calling postback event from Javascript</h2>
<p>There may be some scenario where you may want to explicitly postback to the server using some clientside javascript. It is pretty simple to do this.</p>
<p>ASP.NET already creates a client side javascript method as shown below to support Postbacks for the web controls:<br />
<span style="font-family:courier;color:blue;"><br />
function __doPostBack(eventTarget, eventArgument) {<br />
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {<br />
theForm.__EVENTTARGET.value = eventTarget;<br />
theForm.__EVENTARGUMENT.value = eventArgument;<br />
theForm.submit();<br />
}<br />
}<br />
</span><br />
So, all you have to do is, just call this method with appropriate arguments. You may call this as shown below:<br />
<span style="font-family:courier;color:blue;"><br />
&lt;script language=&#8217;Javascript&#8217;&gt;<br />
__doPostBack(&#8216;__Page&#8217;, &#8216;MyCustomArgument&#8217;);<br />
&lt;/script&gt;<br />
</span><br />
However, it is not reccommdended to use this method name directly in the client side. The best approach is, generate this piece of code from the code behind file using ASP.NET. This way, you are safe even if Microsft later change the name of the method &#8216;__doPostBack&#8217; to something else in a future release.</p>
<p>In your code behind file, declare a protected variable as shown below:<br />
<span style="font-family:courier;color:blue;"><br />
Protected PostBackStr As String<br />
</span></p>
<p>Now, in the page load event, write the following code:<br />
<span style="font-family:courier;color:blue;"><br />
PostBackStr = Page.ClientScript.GetPostBackEventReference(Me, &#8220;MyCustomArgument&#8221;)<br />
</span></p>
<p>The method GetPostBackEventReference() will generate the same piece of client side code that you need to use to call the Postback method. Instead of harcoding the method name __doPostBack, we are asking ASP.NET to tell us what is the method name.</p>
<p>Now insert the following code in your Aspx page:<br />
<span style="font-family:courier;color:blue;"><br />
&lt;script language=&#8217;Javascript&#8217;&gt;<br />
&lt;%= PostBackStr %&gt;<br />
&lt;/script&gt;<br />
</span></p>
<p>At runtime, it will be evaluated as:<br />
<span style="font-family:courier;color:blue;"><br />
&lt;script language=&#8217;Javascript&#8217;&gt;<br />
__doPostBack(&#8216;__Page&#8217;, &#8216;MyCustomArgument&#8217;);<br />
&lt;/script&gt;<br />
</span></p>
<p>Remember to insert the above script into some Javascript method/event where you want to call the postback, instead of simply inserting into the page as shown above.</p>
<p>Generaly, when we do any search  in application , we make edit from there of specific record in new popup. We do save in popup and close that popup and refresh our parent search page, then if we wanted to make search by default, we can use this method by refreshing page with search button <span style="color:darkblue;">control</span><span style="color:darkblue;">.</span></p>
<h1>How to identify and handle the postback in code behind ?</h1>
<p>You found how to call the postback from javascript. Now you need a way to identify your postback in the code behind file. The second argument the doPostback method becomes helpful here.</p>
<p>Go to the code behind file and write the following code in the Page Load event:<br />
<span style="font-family:courier;color:blue;"><br />
If Page.IsPostBack Then<br />
Dim eventArg As String = Request(&#8220;__EVENTARGUMENT&#8221;)<br />
If eventArg = &#8220;MyCustomArgument&#8221; Then<br />
Response.Write(&#8220;You got it !&#8221;)<br />
End If<br />
End If<br />
</span></p>
<p>Did you notice how we identify if the page is loaded as part of our postback? We used the second argument in the __doPostBack method to pass a value and used that in PageLoad to identify if it is called as a result of our PostBack.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/treasure4developer.wordpress.com/46/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/treasure4developer.wordpress.com/46/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/treasure4developer.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/treasure4developer.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/treasure4developer.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/treasure4developer.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/treasure4developer.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/treasure4developer.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/treasure4developer.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/treasure4developer.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/treasure4developer.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/treasure4developer.wordpress.com/46/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=treasure4developer.wordpress.com&blog=209000&post=46&subd=treasure4developer&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://treasure4developer.wordpress.com/2008/06/23/calling-postback-event-from-javascript/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f1e6ec2ad4c3e6b732095751bf6a0227?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">treasure4developer</media:title>
		</media:content>
	</item>
		<item>
		<title>Correlated Joins Using &#8216;Apply&#8217;</title>
		<link>http://treasure4developer.wordpress.com/2008/06/18/correlated-joins-using-apply/</link>
		<comments>http://treasure4developer.wordpress.com/2008/06/18/correlated-joins-using-apply/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 11:20:38 +0000</pubDate>
		<dc:creator>treasure4developer</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[apply]]></category>
		<category><![CDATA[join]]></category>
		<category><![CDATA[partioning]]></category>
		<category><![CDATA[rownumber]]></category>

		<guid isPermaLink="false">http://treasure4developer.wordpress.com/?p=44</guid>
		<description><![CDATA[
SOURCE: http://www.sqlservercentral.com/articles/T-SQL/63115/

One of my cohorts came to me a while back with a SQL Query challenge. He was creating a report for our Live Voice call center application in which he needed to list all Live Voice Transactions within a given date range (easy stuff so far).
The business rules, however, dictate that a Live Voice [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=treasure4developer.wordpress.com&blog=209000&post=44&subd=treasure4developer&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><div>
<p>SOURCE: http://www.sqlservercentral.com/articles/T-SQL/63115/</p></div>
<div id="articleText">
<p>One of my cohorts came to me a while back with a SQL Query challenge. He was creating a report for our Live Voice call center application in which he needed to list all Live Voice Transactions within a given date range (easy stuff so far).</p>
<p>The business rules, however, dictate that a Live Voice transaction can result in 1 to many Live Voice calls actually being made. The call center rep will continue making phone calls until they have either reached the customer in question or until it is determined that the call cannot be completed (bad phone number, etc).</p>
<p>This report was required to only show the 3 most recent calls made for each transaction and for each of the calls, it was required to display the call&#8217;s disposition (busy, voice mail, no answer, etc). Hmmm&#8230;..that&#8217;s a little tougher.</p>
<h3>Take the following:</h3>
<pre>--INNER JOIN
SELECT
 lvt.ID,
 lvt.PhoneNumber,
 lvt.CreateDate,
 lvc.CallWindowStart,
 lvc.CallWindowEnd,
 lvc.LVCallDispositionID
FROM
 LVTransaction lvt
INNER JOIN
 LVCall lvc on lvc.LVTransactionID = lvt.ID
Order By
 Lvt.CreateDate,lvc.CreateDate DESC</pre>
<p>This example gives me All LVCall records for each LVTransaction. Some LVTransactions have up to a dozen calls made before a customer is reached or before it&#8217;s determined that the call cannot be successfully completed. So, this query is close, but not yet what we need.</p>
<p>Any attempts to limit the joined records with correlated logic results in errors due to the fact that the outer query columns are not available to the inner query (out of scope).</p>
<h3>Correlated Join?:</h3>
<pre>--Correlated INNER JOIN Attempt
SELECT
 lvt.ID,
 lvt.PhoneNumber,
 lvt.CreateDate,
 lvc.CallWindowStart,
 lvc.CallWindowEnd,
 lvc.LVCallDispositionID
FROM
 LVTransaction lvt
INNER JOIN
 (SELECT TOP 3 * FROM LVCall WHERE LVTransactionID = lvt.ID ORDER BY CreateDate DESC) lvc on lvc.LVTransactionID = lvt.ID</pre>
<p>This frugal attempt yields the following&#8230;</p>
<pre><span style="color:red;">

Msg 4104, Level 16, State 1, Line 2
The multi-part identifier "lvt.ID" could not be bound.

</span></pre>
<p>The plot thickens&#8230;</p>
<p>So I muddled around with a few ideas, attempting various flavors of correlated subqueries, using temp tables, using User Defined functions, etc. and I was not able to come up with a solution that I felt adequately met the requirements.</p>
<p>This seemingly simple problem was turning into a fairly painful ordeal&#8230;..welcome to my world.</p>
<p>After searching the web for a bit, I finally came up with a workable solution. The APPLY SQL extension introduced with the release of SQL Server 2005. The APPLY statement can be used in your SQL FROM Clause and allows you to call a table returning function for each row of the outer query. Furthermore (and more importantly for our example), it allows you to pass in outer query columns as arguments to the called function.</p>
<p>The apply statement comes in 2 flavors: CROSS APPLY and OUTER APPLY. CROSS APPLY will return All records in the outer query that have a matching record returned by the inner function\query (Similar to an Inner Join). OUTER APPLY will return all records in the outer query whether they have a matching record in the inner function\query or not (Similar to an Outer Join).</p>
<p>In researching the APPLY statement for this article, I came across the following article by Bill Graziano. <a href="http://www.sqlteam.com/article/using-cross-apply-in-sql-server-2005" target="_blank">using CROSS APPLY in SQL Server 2005</a>. This excellent article discusses a very similar scenario to mine and presents the following solution (Using CROSS APPLY):</p>
<h3>CROSS APPLY On A UDF:</h3>
<pre>SELECT C.CustomerID,
 O.SalesOrderID,
 O.TotalDue
FROM
 AdventureWorks.Sales.Customer AS C
CROSS APPLY
 AdventureWorks.dbo.fn_GetTopOrders(C.CustomerID, 3) AS O
ORDER BY
 CustomerID ASC, TotalDue DESC</pre>
<p>Notice that Bill is passing in a &#8220;3&#8243; to the function to indicate that he wants the 3 TOP orders for each customer (Nearly identical to what we need).</p>
<p>The function used above is defined as follows:</p>
<pre>CREATE FUNCTION dbo.fn_GetTopOrders(@custid AS int, @n AS INT)
 RETURNS TABLE
AS
RETURN
 SELECT TOP(@n) *
 FROM Sales.SalesOrderHeader
 WHERE CustomerID = @custid
 ORDER BY TotalDue DESC
GO</pre>
<p>So, although this example gives a great example of using CROSS APPLY, it relies on the use of a UDF, which will work great, but I&#8217;d like to avoid it if possible. When devising my solution, I realized that a subquery behaves very much like a function in that it essentially returns a set of records to the caller (outer query) so I thought to myself that we should be able to use the OUTER APPLY statement on a subquery&#8230;&#8230;like this:</p>
<h3>OUTER APPLY against a SubQuery:</h3>
<pre>--OUTER APPLY
SELECT
 lvt.ID,
 lvt.PhoneNumber,
 lvt.CreateDate,
 lvc.CallWindowStart,
 lvc.CallWindowEnd,
 lvc.LVCallDispositionID
FROM
 LVTransaction lvt
OUTER APPLY
(
 SELECT top 3 *
 FROM LVCall
 WHERE lvtransactionID = lvt.ID
 Order By CreateDate DESC
 ) as lvc</pre>
<h3>VOILA !!!!</h3>
<p>Notice, my solution does the same thing that Bill&#8217;s solution does but it doesn&#8217;t require a UDF so it&#8217;s a little easier to implement and to read, etc.</p>
<p>This is the pattern we&#8217;ve now been using at my work to implement these types of queries. It&#8217;s been easy to teach to other engineers on the team, it works well and it doesn&#8217;t require creating separate UDF&#8217;s for implementation.</p>
<p>In reading Bill&#8217;s article, I also noticed a footnote showing another solution that someone else had sent to him that uses ROW_NUMBER() and PARTITIONING. This was actually very interesting to me. I have to admit that I&#8217;d never even heard of these features until coming across the article (I guess we learn something every day).</p>
<h3>Here&#8217;s the solution to my problem using this technique:</h3>
<pre>ROW_Number() and Partitioning:
--ROW_NUMBER
SELECT
 ID AS LVTransactionID,
 PhoneNumber,
 CreateDate,
 CallWindowStart,
 CallWindowEnd,
 LVCallDispositionID
FROM
(
 SELECT
 lvt.ID,
 lvt.PhoneNumber,
 lvt.CreateDate,
 lvc.CallWindowStart,
 lvc.CallWindowEnd,
 lvc.LVCallDispositionID
 FROM
 LVTransaction lvt
 INNER JOIN
 (
 SELECT *, ROW_Num = ROW_NUMBER() OVER
(PARTITION BY LVCall.LVTransactionID
 ORDER BY LVCall.CreateDate Desc)
 FROM LVCall
 ) lvc on lvc.LVTransactionID = lvt.ID AND lvc.ROW_NUM &lt;= 3
) as result</pre>
<p>This interesting solution provides the exact same resultset as Bill&#8217;s original example and as my eventual solution. It seems a little more complicated to me, but I have to admit, the subtree cost displayed in the Estimated Query Plan suggests that it would perform better than my solution. I plan on investigating this approach further when I have time.</p>
<p>I&#8217;m certain that there are other solutions to this problem. My intent however, with this article is to introduce some T-SQL extensions newly introduced in SQL Server 2005 that you may not have yet come across and to provide a real world example on how their use can solve a real business problem. As other solutions to this same problem come up, I would love to see them. I am concerned with performance as well as ease of application due to the fact that the techniques used must be dispersed throughout our organization so that we are consistent in our implementation with these sorts of problems.</p></div>
<div>SOURCE: http://www.sqlservercentral.com/articles/T-SQL/63115/</div>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/treasure4developer.wordpress.com/44/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/treasure4developer.wordpress.com/44/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/treasure4developer.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/treasure4developer.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/treasure4developer.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/treasure4developer.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/treasure4developer.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/treasure4developer.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/treasure4developer.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/treasure4developer.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/treasure4developer.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/treasure4developer.wordpress.com/44/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=treasure4developer.wordpress.com&blog=209000&post=44&subd=treasure4developer&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://treasure4developer.wordpress.com/2008/06/18/correlated-joins-using-apply/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f1e6ec2ad4c3e6b732095751bf6a0227?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">treasure4developer</media:title>
		</media:content>
	</item>
		<item>
		<title>Data Type Mapping</title>
		<link>http://treasure4developer.wordpress.com/2008/06/18/data-type-mapping/</link>
		<comments>http://treasure4developer.wordpress.com/2008/06/18/data-type-mapping/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 09:55:05 +0000</pubDate>
		<dc:creator>treasure4developer</dc:creator>
				<category><![CDATA[ASP.NET & C#]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[data type mapping]]></category>

		<guid isPermaLink="false">http://treasure4developer.wordpress.com/?p=43</guid>
		<description><![CDATA[




















Mapping data types into different environments like .Net and SQL server.




 ASP.NET Control
DNN KickStart Field type
.NET
Framework
SQL
Server
ADO
DataType
Enum
ADO
DataType
Enum
Value
Size
Access
Oracle
Visual
Basic
6.0




Int64
SqlDbType.BigInt
OleDbType.BigInt
bigint
adBigInt
20
8


Variant




Byte[]
SqlDbType.VarBinary
OleDbType.Binary
binary
timestamp
adBinary
128
50
8

Raw
Variant



Yes/No
Boolean
SqlDbType.Bit
OleDbType.Boolean
bit
adBoolean
11
1
2
YesNo

Boolean




String
OleDbType.BSTR

adBSTR
8








(DataReader)

adChapter
136







Text
Document
String
SqlDbType.Char
OleDbType.Char
char
adChar
129
X

Char
String



Money
Decimal
SqlDbType.Money
OleDbType.Currency
money
smallmoney
adCurrency
6
8
4
0
Currency

Currency




DateTime
OleDbType.DBDate

adDate
7
0
DateTime

Date




DateTime
OleDbType.DBDate

adDBDate
133








DBFileTime

adDBFileTime
137








DateTime
OleDbType.DBTime

adDBTime
134







Date
Time
DateTime
SqlDbType.DateTime
OleDbType.DBTimeStamp
datetime
smalldatetime
adDBTimeStamp
135
8
4
0
DateTime
Date
Date




Decimal
OleDbType.Decimal

adDecimal
14


Decimal
Variant 6




Double
SqlDbType.Float
OleDbType.Double
float
adDouble
5
8
0
Double
Float
Double




Empty

adEmpty
0








External-Exception
OleDbType.Error

adError
10








DateTime
OleDbType.Filetime

adFileTime
64








Guid
SqlDbType.UniqueIdentifier
OleDbType.Guid
uniqueidentifier
adGUID
72
16
ReplicationID

Variant




Object
OleDbType.IDispatch

adIDispatch
9







Identifier
Number
Int32
SqlDbType.Int
OleDbType.Integer
identity
int
adInteger
3
4
4
AutoNumber
Long Integer
Int
Long




Object
OleDbType.IUnknown

adIUnknown
13








Byte[]
SqlDbType.VarBinary
OleDbType.LongVarBinary
image
adLongVarBinary
205
2147483647
OLEObject
Long Raw
Blob
Variant




String
SqlDbType.VarChar
OleDbType.LongVarChar
text
adLongVarChar
201
2147483647
Memo
Hyperlink
Long
Clob
String




String
SqlDbType.NText
OleDbType.VarWChar
ntext
adLongVarWChar
203
1073741823
Memo
Hyperlink
NClob
String




Decimal
SqlDbType.Decimal
OleDbType.Decimal
decimal
numeric
adNumeric
131
9
Decimal
Decimal
Integer
Number
SmallInt
Variant




Object
OleDbType.PropVariant

adPropVariant
138








Single
SqlDbType.Real
OleDbType.Single
real
adSingle
4
4
Single

Single




Int16,
SqlDbType.SmallInt
OleDbType.SmallInt
smallInt
adSmallInt
2
2
Integer

Integer




Byte
OleDbType.TinyInt

adTinyInt
16








UInt64
OleDbType.UnsignedBigInt

adUnsignedBigInt
21








UInt32
OleDbType.UnsignedInt

adUnsignedInt
19








UInt16
OleDbType.UnsignedSmallInt

adUnsignedSmallInt
18








Byte
SqlDbType.TinyInt
OleDbType.UnsignedTinyInt
tinyInt
adUnsignedTinyInt
17
1
Byte

Byte






adUserDefined
132








Byte[]
SqlDbType.VarBinary
OleDbType.VarBinary
varbinary
adVarBinary
204
50
ReplicationID

Variant




String
SqlDbType.VarChar
OleDbType.VarChar
varchar
adVarChar
200
X
Text
VarChar
String




Object
SqlDbType.Variant
OleDbType.Variant
sql_variant
adVariant
12
8016

VarChar2
Variant




OleDbType.VarNumeric

adVarNumeric
139








String
SqlDbType.NVarChar
OleDbType.VarWChar
nvarchar
adVarWChar
202
X
Text
NVarChar2
String




String
SqlDbType.NChar
OleDbType.WChar
nchar
adWChar
130
X


String




and the Managed Extensions for C++. The table also includes entries for the Object and String classes, for which many languages have corresponding keywords.





Category
Class name
Description
Visual Basic data type
C# data type
Managed Extensions for C++ data type
JScript data type


Integer
Byte
An [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=treasure4developer.wordpress.com&blog=209000&post=43&subd=treasure4developer&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><table border="0" cellspacing="0" cellpadding="0" width="100%" align="center">
<tbody>
<tr>
<td class="BarFrameRImg2TM">
<table style="height:100%;" border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td style="padding-left:5px;padding-right:5px;" width="100%" valign="middle"><span class="dnnTitle11px"><br />
</span></td>
<td style="padding-left:5px;padding-right:5px;" valign="top"><a id="dnn_ctr967_dnnVISIBILITY_cmdVisibility" title="Minimize" href="__doPostBack('dnn$ctr967$dnnVISIBILITY$cmdVisibility','')"><br />
</a></td>
</tr>
</tbody>
</table>
</td>
<td class="BarFrameRImg2TR"><strong><span class="dnnTitle11px"><br />
</span></strong></td>
</tr>
<tr valign="top">
<td class="BarFrameRDarkLM"></td>
<td style="padding:5px;" align="left"><!-- Start_Module_967 --></p>
<div id="dnn_ctr967_ModuleContent"><span class="Normal">Mapping data types into different environments like .Net and SQL server.</p>
<div>
<table id="Table1" border="1" cellspacing="0" cellpadding="3">
<tbody>
<tr>
<th align="center"> ASP.NET Control</th>
<th align="center">DNN KickStart Field type</th>
<th align="center">.NET<br />
Framework</th>
<th align="center">SQL<br />
Server</th>
<th align="center">ADO<br />
DataType<br />
Enum</th>
<th align="center"><strong>ADO<br />
DataType<br />
Enum<br />
Value</strong></th>
<th align="center">Size</th>
<th align="center"><strong>Access</strong></th>
<th align="center"><strong>Oracle</strong></th>
<th align="center"><strong>Visual<br />
Basic<br />
6.0</strong></th>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Int64<br />
SqlDbType.BigInt<sup><a href="http://www.carlprothman.net/Default.aspx?tabid=97#10"><br />
</a></sup>OleDbType.BigInt</td>
<td class="Normal" align="center">bigint</td>
<td class="Normal" align="center">adBigInt</td>
<td class="Normal" align="center">20</td>
<td class="Normal" align="center">8</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Variant</td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Byte[]<br />
SqlDbType.VarBinary<sup><a href="http://www.carlprothman.net/Default.aspx?tabid=97#10"><br />
</a></sup>OleDbType.Binary</td>
<td class="Normal" align="center">binary<br />
timestamp</td>
<td class="Normal" align="center">adBinary</td>
<td class="Normal" align="center">128</td>
<td class="Normal" align="center">50<br />
8</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Raw</td>
<td class="Normal" align="center">Variant</td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Yes/No</td>
<td class="Normal" align="center">Boolean<br />
SqlDbType.Bit<br />
OleDbType.Boolean</td>
<td class="Normal" align="center">bit</td>
<td class="Normal" align="center">adBoolean</td>
<td class="Normal" align="center">11</td>
<td class="Normal" align="center">1<br />
2</td>
<td class="Normal" align="center">YesNo</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Boolean</td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">String<br />
OleDbType.BSTR</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">adBSTR</td>
<td class="Normal" align="center">8</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">(DataReader)</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">adChapter</td>
<td class="Normal" align="center">136</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Text<br />
Document</td>
<td class="Normal" align="center">String<br />
SqlDbType.Char<sup><a href="http://www.carlprothman.net/Default.aspx?tabid=97#10"><br />
</a></sup>OleDbType.Char</td>
<td class="Normal" align="center">char</td>
<td class="Normal" align="center">adChar</td>
<td class="Normal" align="center">129</td>
<td class="Normal" align="center">X</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Char</td>
<td class="Normal" align="center">String</td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Money</td>
<td class="Normal" align="center">Decimal<br />
SqlDbType.Money<a href="http://www.carlprothman.net/Default.aspx?tabid=97#10"><sup><br />
</sup></a>OleDbType.Currency</td>
<td class="Normal" align="center">money<br />
smallmoney</td>
<td class="Normal" align="center">adCurrency</td>
<td class="Normal" align="center">6</td>
<td class="Normal" align="center">8<br />
4<br />
0</td>
<td class="Normal" align="center">Currency</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Currency</td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">DateTime<br />
OleDbType.DBDate</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">adDate</td>
<td class="Normal" align="center">7</td>
<td class="Normal" align="center">0</td>
<td class="Normal" align="center">DateTime</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Date</td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">DateTime<br />
OleDbType.DBDate</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">adDBDate</td>
<td class="Normal" align="center">133</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">DBFileTime</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">adDBFileTime</td>
<td class="Normal" align="center">137</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">DateTime<br />
OleDbType.DBTime</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">adDBTime</td>
<td class="Normal" align="center">134</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Date<br />
Time</td>
<td class="Normal" align="center">DateTime<br />
SqlDbType.DateTime<sup><a href="http://www.carlprothman.net/Default.aspx?tabid=97#10"><br />
</a></sup>OleDbType.DBTimeStamp</td>
<td class="Normal" align="center">datetime<br />
smalldatetime</td>
<td class="Normal" align="center">adDBTimeStamp</td>
<td class="Normal" align="center">135</td>
<td class="Normal" align="center">8<br />
4<br />
0</td>
<td class="Normal" align="center">DateTime</td>
<td class="Normal" align="center">Date</td>
<td class="Normal" align="center">Date</td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Decimal<br />
OleDbType.Decimal</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">adDecimal</td>
<td class="Normal" align="center">14</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Decimal</td>
<td class="Normal" align="center">Variant <sup><a href="http://www.carlprothman.net/Default.aspx?tabid=97#6">6</a></sup></td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Double<br />
SqlDbType.Float<sup><a href="http://www.carlprothman.net/Default.aspx?tabid=97#10"><br />
</a></sup>OleDbType.Double</td>
<td class="Normal" align="center">float</td>
<td class="Normal" align="center">adDouble</td>
<td class="Normal" align="center">5</td>
<td class="Normal" align="center">8<br />
0</td>
<td class="Normal" align="center">Double</td>
<td class="Normal" align="center">Float</td>
<td class="Normal" align="center">Double</td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Empty</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">adEmpty</td>
<td class="Normal" align="center">0</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">External-Exception<br />
OleDbType.Error</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">adError</td>
<td class="Normal" align="center">10</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">DateTime<br />
OleDbType.Filetime</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">adFileTime</td>
<td class="Normal" align="center">64</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Guid<br />
SqlDbType.UniqueIdentifier<sup><a href="http://www.carlprothman.net/Default.aspx?tabid=97#10"><br />
</a></sup>OleDbType.Guid</td>
<td class="Normal" align="center">uniqueidentifier</td>
<td class="Normal" align="center">adGUID</td>
<td class="Normal" align="center">72</td>
<td class="Normal" align="center">16</td>
<td class="Normal" align="center">ReplicationID</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Variant</td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Object<br />
OleDbType.IDispatch</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">adIDispatch</td>
<td class="Normal" align="center">9</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Identifier<br />
Number</td>
<td class="Normal" align="center">Int32<br />
SqlDbType.Int<sup><a href="http://www.carlprothman.net/Default.aspx?tabid=97#10"><br />
</a></sup>OleDbType.Integer</td>
<td class="Normal" align="center">identity<br />
int</td>
<td class="Normal" align="center">adInteger</td>
<td class="Normal" align="center">3</td>
<td class="Normal" align="center">4<br />
4</td>
<td class="Normal" align="center">AutoNumber<br />
Long Integer</td>
<td class="Normal" align="center">Int</td>
<td class="Normal" align="center">Long</td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Object<br />
OleDbType.IUnknown</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">adIUnknown</td>
<td class="Normal" align="center">13</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Byte[]<br />
SqlDbType.VarBinary<sup><a href="http://www.carlprothman.net/Default.aspx?tabid=97#10"><br />
</a></sup>OleDbType.LongVarBinary</td>
<td class="Normal" align="center">image</td>
<td class="Normal" align="center">adLongVarBinary</td>
<td class="Normal" align="center">205</td>
<td class="Normal" align="center">2147483647</td>
<td class="Normal" align="center">OLEObject</td>
<td class="Normal" align="center">Long Raw<sup><br />
</sup>Blob</td>
<td class="Normal" align="center">Variant</td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">String<br />
SqlDbType.VarChar<sup><a href="http://www.carlprothman.net/Default.aspx?tabid=97#10"><br />
</a></sup>OleDbType.LongVarChar</td>
<td class="Normal" align="center">text</td>
<td class="Normal" align="center">adLongVarChar</td>
<td class="Normal" align="center">201</td>
<td class="Normal" align="center">2147483647</td>
<td class="Normal" align="center">Memo<br />
Hyperlink</td>
<td class="Normal" align="center">Long<sup><br />
</sup>Clob</td>
<td class="Normal" align="center">String</td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">String<br />
SqlDbType.NText<a href="http://www.carlprothman.net/Default.aspx?tabid=97#10"><sup><br />
</sup></a>OleDbType.VarWChar</td>
<td class="Normal" align="center">ntext</td>
<td class="Normal" align="center">adLongVarWChar</td>
<td class="Normal" align="center">203</td>
<td class="Normal" align="center">1073741823</td>
<td class="Normal" align="center">Memo<br />
Hyperlink</td>
<td class="Normal" align="center">NClob</td>
<td class="Normal" align="center">String</td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Decimal<br />
SqlDbType.Decimal<sup><a href="http://www.carlprothman.net/Default.aspx?tabid=97#10"><br />
</a></sup>OleDbType.Decimal</td>
<td class="Normal" align="center">decimal<br />
numeric</td>
<td class="Normal" align="center">adNumeric</td>
<td class="Normal" align="center">131</td>
<td class="Normal" align="center">9</td>
<td class="Normal" align="center">Decimal</td>
<td class="Normal" align="center">Decimal<br />
Integer<br />
Number<br />
SmallInt</td>
<td class="Normal" align="center">Variant</td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Object<br />
OleDbType.PropVariant</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">adPropVariant</td>
<td class="Normal" align="center">138</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Single<br />
SqlDbType.Real<sup><a href="http://www.carlprothman.net/Default.aspx?tabid=97#10"><br />
</a></sup>OleDbType.Single</td>
<td class="Normal" align="center">real</td>
<td class="Normal" align="center">adSingle</td>
<td class="Normal" align="center">4</td>
<td class="Normal" align="center">4</td>
<td class="Normal" align="center">Single</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Single</td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Int16,<br />
SqlDbType.SmallInt<sup><a href="http://www.carlprothman.net/Default.aspx?tabid=97#10"><br />
</a></sup>OleDbType.SmallInt</td>
<td class="Normal" align="center">smallInt</td>
<td class="Normal" align="center">adSmallInt</td>
<td class="Normal" align="center">2</td>
<td class="Normal" align="center">2</td>
<td class="Normal" align="center">Integer</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Integer</td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Byte<br />
OleDbType.TinyInt</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">adTinyInt</td>
<td class="Normal" align="center">16</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">UInt64<br />
OleDbType.UnsignedBigInt</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">adUnsignedBigInt</td>
<td class="Normal" align="center">21</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">UInt32<br />
OleDbType.UnsignedInt</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">adUnsignedInt</td>
<td class="Normal" align="center">19</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">UInt16<br />
OleDbType.UnsignedSmallInt</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">adUnsignedSmallInt</td>
<td class="Normal" align="center">18</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Byte<br />
SqlDbType.TinyInt<sup><a href="http://www.carlprothman.net/Default.aspx?tabid=97#10"><br />
</a></sup>OleDbType.UnsignedTinyInt</td>
<td class="Normal" align="center">tinyInt</td>
<td class="Normal" align="center">adUnsignedTinyInt</td>
<td class="Normal" align="center">17</td>
<td class="Normal" align="center">1</td>
<td class="Normal" align="center">Byte</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Byte</td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">adUserDefined</td>
<td class="Normal" align="center">132</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Byte[]<br />
SqlDbType.VarBinary<sup><a href="http://www.carlprothman.net/Default.aspx?tabid=97#10"><br />
</a></sup>OleDbType.VarBinary</td>
<td class="Normal" align="center">varbinary</td>
<td class="Normal" align="center">adVarBinary</td>
<td class="Normal" align="center">204</td>
<td class="Normal" align="center">50</td>
<td class="Normal" align="center">ReplicationID</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Variant</td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">String<br />
SqlDbType.VarChar<sup><a href="http://www.carlprothman.net/Default.aspx?tabid=97#10"><br />
</a></sup>OleDbType.VarChar</td>
<td class="Normal" align="center">varchar</td>
<td class="Normal" align="center">adVarChar</td>
<td class="Normal" align="center">200</td>
<td class="Normal" align="center">X</td>
<td class="Normal" align="center">Text</td>
<td class="Normal" align="center">VarChar</td>
<td class="Normal" align="center">String</td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">Object<br />
SqlDbType.Variant<br />
OleDbType.Variant</td>
<td class="Normal" align="center">sql_variant</td>
<td class="Normal" align="center">adVariant</td>
<td class="Normal" align="center">12</td>
<td class="Normal" align="center">8016</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">VarChar2</td>
<td class="Normal" align="center">Variant</td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">OleDbType.VarNumeric</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">adVarNumeric</td>
<td class="Normal" align="center">139</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">String<br />
SqlDbType.NVarChar<sup><a href="http://www.carlprothman.net/Default.aspx?tabid=97#10"><br />
</a></sup>OleDbType.VarWChar</td>
<td class="Normal" align="center">nvarchar</td>
<td class="Normal" align="center">adVarWChar</td>
<td class="Normal" align="center">202</td>
<td class="Normal" align="center">X</td>
<td class="Normal" align="center">Text</td>
<td class="Normal" align="center">NVarChar2</td>
<td class="Normal" align="center">String</td>
</tr>
<tr>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">String<br />
SqlDbType.NChar<sup><a href="http://www.carlprothman.net/Default.aspx?tabid=97#10"><br />
</a></sup>OleDbType.WChar</td>
<td class="Normal" align="center">nchar</td>
<td class="Normal" align="center">adWChar</td>
<td class="Normal" align="center">130</td>
<td class="Normal" align="center">X</td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center"></td>
<td class="Normal" align="center">String</td>
</tr>
</tbody>
</table>
</div>
<p>and the Managed Extensions for C++. The table also includes entries for the <strong>Object</strong> and <strong>String</strong> classes, for which many languages have corresponding keywords.</p>
<p></span></p>
<div class="tablediv">
<table class="dtTABLE" style="height:628px;" border="1" cellspacing="0" width="941">
<tbody>
<tr valign="top">
<th width="11%">Category</th>
<th width="10%">Class name</th>
<th width="17%">Description</th>
<th width="15%">Visual Basic data type</th>
<th width="16%">C# data type</th>
<th width="15%">Managed Extensions for C++ data type</th>
<th width="16%">JScript data type</th>
</tr>
<tr valign="top">
<td width="11%">Integer</td>
<td width="10%">Byte</td>
<td width="17%">An 8-bit unsigned integer.</td>
<td width="15%"><strong>Byte</strong></td>
<td width="16%"><strong>byte</strong></td>
<td width="15%"><strong>char</strong></td>
<td width="16%"><strong>Byte</strong></td>
</tr>
<tr valign="top">
<td width="11%"></td>
<td width="10%">SByte</td>
<td width="17%">An 8-bit signed integer.Not CLS-compliant.</td>
<td width="15%"><strong>SByte</strong>No built-in type<em>.</em></td>
<td width="16%"><strong>sbyte</strong></td>
<td width="15%"><strong>signed char</strong></td>
<td width="16%"><strong>SByte</strong></td>
</tr>
<tr valign="top">
<td width="11%"></td>
<td width="10%">Int16</td>
<td width="17%">A 16-bit signed integer.</td>
<td width="15%"><strong>Short</strong></td>
<td width="16%"><strong>short</strong></td>
<td width="15%"><strong>short</strong></td>
<td width="16%"><strong>short</strong></td>
</tr>
<tr valign="top">
<td width="11%"></td>
<td width="10%">Int32</td>
<td width="17%">A 32-bit signed integer.</td>
<td width="15%"><strong>Integer</strong></td>
<td width="16%"><strong>int</strong></td>
<td width="15%"><strong>int</strong>-or-</p>
<p><strong>long</strong></td>
<td width="16%"><strong>int</strong></td>
</tr>
<tr valign="top">
<td width="11%"></td>
<td width="10%">Int64</td>
<td width="17%">A 64-bit signed integer.</td>
<td width="15%"><strong>Long</strong></td>
<td width="16%"><strong>long</strong></td>
<td width="15%"><strong>__int64</strong></td>
<td width="16%"><strong>long</strong></td>
</tr>
<tr valign="top">
<td width="11%"></td>
<td width="10%">UInt16</td>
<td width="17%">A 16-bit unsigned integer.Not CLS-compliant.</td>
<td width="15%"><strong>UInt16</strong>No built-in type.</td>
<td width="16%"><strong>ushort</strong></td>
<td width="15%"><strong>unsigned short</strong></td>
<td width="16%"><strong>UInt16</strong></td>
</tr>
<tr valign="top">
<td width="11%"></td>
<td width="10%">UInt32</td>
<td width="17%">A 32-bit unsigned integer.Not CLS-compliant.</td>
<td width="15%"><strong>UInt32</strong>No built-in type.</td>
<td width="16%"><strong>uint</strong></td>
<td width="15%"><strong>unsigned int</strong>-or-</p>
<p><strong>unsigned long</strong></td>
<td width="16%"><strong>UInt32</strong></td>
</tr>
<tr valign="top">
<td width="11%"></td>
<td width="10%">UInt64</td>
<td width="17%">A 64-bit unsigned integer.Not CLS-compliant.</td>
<td width="15%"><strong>UInt64</strong>No built-in type.</td>
<td width="16%"><strong>ulong</strong></td>
<td width="15%"><strong>unsigned __int64</strong></td>
<td width="16%"><strong>UInt64</strong></td>
</tr>
<tr valign="top">
<td width="11%">Floating point</td>
<td width="10%">Single</td>
<td width="17%">A single-precision (32-bit) floating-point number.</td>
<td width="15%"><strong>Single</strong></td>
<td width="16%"><strong>float</strong></td>
<td width="15%"><strong>float</strong></td>
<td width="16%"><strong>float</strong></td>
</tr>
<tr valign="top">
<td width="11%"></td>
<td width="10%">Double</td>
<td width="17%">A double-precision (64-bit) floating-point number.</td>
<td width="15%"><strong>Double</strong></td>
<td width="16%"><strong>double</strong></td>
<td width="15%"><strong>double</strong></td>
<td width="16%"><strong>double</strong></td>
</tr>
<tr valign="top">
<td width="11%">Logical</td>
<td width="10%">Boolean</td>
<td width="17%">A Boolean value (true or false).</td>
<td width="15%"><strong>Boolean</strong></td>
<td width="16%"><strong>bool</strong></td>
<td width="15%"><strong>bool</strong></td>
<td width="16%"><strong>bool</strong></td>
</tr>
<tr valign="top">
<td width="11%">Other</td>
<td width="10%">Char</td>
<td width="17%">A Unicode (16-bit) character.</td>
<td width="15%"><strong>Char</strong></td>
<td width="16%"><strong>char</strong></td>
<td width="15%"><strong>wchar_t</strong></td>
<td width="16%"><strong>char</strong></td>
</tr>
<tr valign="top">
<td width="11%"></td>
<td width="10%">Decimal</td>
<td width="17%">A 96-bit decimal value.</td>
<td width="15%"><strong>Decimal</strong></td>
<td width="16%"><strong>decimal</strong></td>
<td width="15%"><strong>Decimal</strong></td>
<td width="16%"><strong>Decimal</strong></td>
</tr>
<tr valign="top">
<td width="11%"></td>
<td width="10%">IntPtr</td>
<td width="17%">A signed integer whose size depends on the underlying platform (a 32-bit value on a 32-bit platform and a 64-bit value on a 64-bit platform).</td>
<td width="15%"><strong>IntPtr</strong>No built-in type.</td>
<td width="16%"><strong>IntPtr</strong>No built-in type.</td>
<td width="15%"><strong>IntPtr</strong>No built-in type.</td>
<td width="16%"><strong>IntPtr</strong></td>
</tr>
<tr valign="top">
<td width="11%"></td>
<td width="10%">UIntPtr</td>
<td width="17%">An unsigned integer whose size depends on the underlying platform (a 32- bit value on a 32-bit platform and a 64-bit value on a 64-bit platform).Not CLS-compliant.</td>
<td width="15%"><strong>UIntPtr</strong>No built-in type.</td>
<td width="16%"><strong>UIntPtr</strong>No built-in type.</td>
<td width="15%"><strong>UIntPtr</strong>No built-in type.</td>
<td width="16%"><strong>UIntPtr</strong></td>
</tr>
<tr valign="top">
<td width="11%">Class objects</td>
<td width="10%">Object</td>
<td width="17%">The root of the object hierarchy.</td>
<td width="15%"><strong>Object</strong></td>
<td width="16%"><strong>object</strong></td>
<td width="15%"><strong>Object*</strong></td>
<td width="16%"><strong>Object</strong></td>
</tr>
<tr valign="top">
<td width="11%"></td>
<td width="10%">String</td>
<td width="17%">An immutable, fixed-length string of Unicode characters.</td>
<td width="15%"><strong>String</strong></td>
<td width="16%"><strong>string</strong></td>
<td width="15%"><strong>String*</strong></td>
<td width="16%"><strong>String</strong></td>
</tr>
</tbody>
</table>
</div>
</div>
</td>
</tr>
</tbody>
</table>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/treasure4developer.wordpress.com/43/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/treasure4developer.wordpress.com/43/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/treasure4developer.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/treasure4developer.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/treasure4developer.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/treasure4developer.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/treasure4developer.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/treasure4developer.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/treasure4developer.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/treasure4developer.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/treasure4developer.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/treasure4developer.wordpress.com/43/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=treasure4developer.wordpress.com&blog=209000&post=43&subd=treasure4developer&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://treasure4developer.wordpress.com/2008/06/18/data-type-mapping/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f1e6ec2ad4c3e6b732095751bf6a0227?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">treasure4developer</media:title>
		</media:content>
	</item>
	</channel>
</rss>