<?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-4416629138379748150</id><updated>2012-02-07T19:51:48.666+05:30</updated><category term='Reporting'/><category term='BO'/><category term='correlated'/><category term='sql'/><category term='Database'/><category term='Advanced SQL'/><category term='pl/sql'/><category term='Indexes'/><category term='info'/><category term='Strangest of bugs'/><category term='issue'/><category term='db2'/><category term='Crystal reports'/><category term='update'/><category term='oracle'/><title type='text'>Knowledge Pool</title><subtitle type='html'>A Common Knowledge Repository and Forum For Sharing Ideas, Findings and Solving Problems</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Rahul Nair</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KHvJHM2ebug/AAAAAAAAAAI/AAAAAAAAG6k/asNt3mUthVw/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>35</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-6850217131711856468</id><published>2011-10-31T11:57:00.000+05:30</published><updated>2011-10-31T11:57:04.000+05:30</updated><title type='text'>BI Applications: Bind Variables in View Objects</title><content type='html'>&lt;a href="http://obiapplications.blogspot.com/2011/10/bind-variables-in-view-objects.html?spref=bl"&gt;BI Applications: Bind Variables in View Objects&lt;/a&gt;: We have a setting in ADF layer using which we can specify how the View Criteria and the WHERE clauses used in the queries fired on the VOs  ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-6850217131711856468?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/6850217131711856468/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2011/10/bi-applications-bind-variables-in-view.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/6850217131711856468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/6850217131711856468'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2011/10/bi-applications-bind-variables-in-view.html' title='BI Applications: Bind Variables in View Objects'/><author><name>Manjunath RG</name><uri>http://www.blogger.com/profile/02411602361604062965</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/-iw4Dw-2Td38/ThQPhPkU_zI/AAAAAAAACBg/VHHP2Mbxqto/s220/Copy%2Bof%2Bcalvin66.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-1127133822561189648</id><published>2011-09-29T22:37:00.000+05:30</published><updated>2011-09-29T22:37:02.307+05:30</updated><title type='text'>The request filtering module is configured to deny a request that exceeds the request content length</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;HTTP Error 400 Bad request&lt;br /&gt;&lt;br /&gt;Or&lt;br /&gt;&lt;br /&gt;&amp;nbsp; Unable to upload large/bigger files on to web server (IIS)&lt;br /&gt;&lt;br /&gt;Include the following setting in your Web.config file.&lt;br /&gt;&amp;lt;system.webServer&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;security&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;requestFiltering&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;requestLimits maxAllowedContentLength="1000000000" /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/requestFiltering&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/security&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/system.webServer&amp;gt;&lt;br /&gt;&lt;br /&gt;It allows upto 1000MB file to be uploaded.&lt;br /&gt;The same can be achieved by the following command too.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;%windir%\system32\inetsrv\appcmd set config &lt;strong&gt;"Default Web Site/&amp;lt;your app&amp;gt;"&lt;/strong&gt; -section:requestFiltering -requestLimits.maxAllowedContentLength:1000000000&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-1127133822561189648?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/1127133822561189648/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2011/09/request-filtering-module-is-configured.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/1127133822561189648'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/1127133822561189648'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2011/09/request-filtering-module-is-configured.html' title='The request filtering module is configured to deny a request that exceeds the request content length'/><author><name>Basha</name><uri>http://www.blogger.com/profile/07595532281609156242</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-5129995283357894378</id><published>2011-09-13T16:49:00.000+05:30</published><updated>2011-09-13T16:49:41.455+05:30</updated><title type='text'>BI Applications: Trees in Peoplesoft Simplified</title><content type='html'>&lt;a href="http://obiapplications.blogspot.com/2011/09/trees-in-peoplesoft-simplified.html?spref=bl"&gt;BI Applications: Trees in Peoplesoft Simplified&lt;/a&gt;: Trees in PSFT can be broadly classified into Summer Trees and Winter Trees. I will take the same example of Department for both the cases so...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-5129995283357894378?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/5129995283357894378/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2011/09/bi-applications-trees-in-peoplesoft.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/5129995283357894378'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/5129995283357894378'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2011/09/bi-applications-trees-in-peoplesoft.html' title='BI Applications: Trees in Peoplesoft Simplified'/><author><name>Manjunath RG</name><uri>http://www.blogger.com/profile/02411602361604062965</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/-iw4Dw-2Td38/ThQPhPkU_zI/AAAAAAAACBg/VHHP2Mbxqto/s220/Copy%2Bof%2Bcalvin66.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-1960712153600785927</id><published>2011-08-18T19:02:00.001+05:30</published><updated>2011-08-18T19:02:15.104+05:30</updated><title type='text'>BI Applications: Collations in SQL Server</title><content type='html'>&lt;a href="http://obiapplications.blogspot.com/2011/08/collations-in-sql-server.html?spref=bl"&gt;BI Applications: Collations in SQL Server&lt;/a&gt;: Character Strings are stored in the SQL Server database using certain Bit Patterns.&lt;br /&gt;A collation specifies the bit patterns that represent e...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-1960712153600785927?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/1960712153600785927/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2011/08/bi-applications-collations-in-sql_18.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/1960712153600785927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/1960712153600785927'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2011/08/bi-applications-collations-in-sql_18.html' title='BI Applications: Collations in SQL Server'/><author><name>Manjunath RG</name><uri>http://www.blogger.com/profile/02411602361604062965</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/-iw4Dw-2Td38/ThQPhPkU_zI/AAAAAAAACBg/VHHP2Mbxqto/s220/Copy%2Bof%2Bcalvin66.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-5533250072373925178</id><published>2011-08-18T19:02:00.000+05:30</published><updated>2011-08-18T19:02:03.151+05:30</updated><title type='text'>BI Applications: Collations in SQL Server</title><content type='html'>&lt;a href="http://obiapplications.blogspot.com/2011/08/collations-in-sql-server.html?spref=bl"&gt;BI Applications: Collations in SQL Server&lt;/a&gt;: Character Strings are stored in the SQL Server database using certain Bit Patterns.&lt;br /&gt;A collation specifies the bit patterns that represent e...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-5533250072373925178?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/5533250072373925178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2011/08/bi-applications-collations-in-sql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/5533250072373925178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/5533250072373925178'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2011/08/bi-applications-collations-in-sql.html' title='BI Applications: Collations in SQL Server'/><author><name>Manjunath RG</name><uri>http://www.blogger.com/profile/02411602361604062965</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/-iw4Dw-2Td38/ThQPhPkU_zI/AAAAAAAACBg/VHHP2Mbxqto/s220/Copy%2Bof%2Bcalvin66.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-2432870065517989697</id><published>2011-08-05T13:50:00.000+05:30</published><updated>2011-08-05T13:50:15.692+05:30</updated><title type='text'>BI Applications: Resetting the password for SYS User</title><content type='html'>&lt;a href="http://obiapplications.blogspot.com/2011/08/resetting-password-for-sys-user.html?spref=bl"&gt;BI Applications: Resetting the password for SYS User&lt;/a&gt;: "Many times we tend to forget the password of the SYS user.  In such cases log onto the machine which hosts the DB server and connect as SYSD..."&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-2432870065517989697?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://obiapplications.blogspot.com/2011/08/resetting-password-for-sys-user.html?spref=bl' title='BI Applications: Resetting the password for SYS User'/><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/2432870065517989697/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2011/08/bi-applications-resetting-password-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/2432870065517989697'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/2432870065517989697'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2011/08/bi-applications-resetting-password-for.html' title='BI Applications: Resetting the password for SYS User'/><author><name>Manjunath RG</name><uri>http://www.blogger.com/profile/02411602361604062965</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/-iw4Dw-2Td38/ThQPhPkU_zI/AAAAAAAACBg/VHHP2Mbxqto/s220/Copy%2Bof%2Bcalvin66.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-5625443719467218038</id><published>2011-03-14T19:46:00.000+05:30</published><updated>2011-03-14T19:46:30.631+05:30</updated><title type='text'>BI Applications: Overrides in Informatica</title><content type='html'>&lt;a href="http://obiapplications.blogspot.com/2011/03/overrides-in-informatica.html?spref=bl"&gt;BI Applications: Overrides in Informatica&lt;/a&gt;: "Few points regarding overrides in INFA -   Source Qualifier Override -  1. The number of columns in the SQ query should match with the numbe..."&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-5625443719467218038?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://obiapplications.blogspot.com/2011/03/overrides-in-informatica.html?spref=bl' title='BI Applications: Overrides in Informatica'/><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/5625443719467218038/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2011/03/bi-applications-overrides-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/5625443719467218038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/5625443719467218038'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2011/03/bi-applications-overrides-in.html' title='BI Applications: Overrides in Informatica'/><author><name>Manjunath RG</name><uri>http://www.blogger.com/profile/02411602361604062965</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/-iw4Dw-2Td38/ThQPhPkU_zI/AAAAAAAACBg/VHHP2Mbxqto/s220/Copy%2Bof%2Bcalvin66.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-4230552136835911422</id><published>2011-01-18T13:45:00.000+05:30</published><updated>2011-01-18T13:45:33.125+05:30</updated><title type='text'>BI Applications: Configuring INFA Connections in DAC</title><content type='html'>&lt;a href="http://obiapplications.blogspot.com/2011/01/configuring-infa-connections-in-dac.html?spref=bl"&gt;BI Applications: Configuring INFA Connections in DAC&lt;/a&gt;: "Configuring the physical connections can be quiet daunting for Informatica DW server and REP server.  First - Provide all the details in Set..."&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-4230552136835911422?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://obiapplications.blogspot.com/2011/01/configuring-infa-connections-in-dac.html?spref=bl' title='BI Applications: Configuring INFA Connections in DAC'/><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/4230552136835911422/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2011/01/bi-applications-configuring-infa.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/4230552136835911422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/4230552136835911422'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2011/01/bi-applications-configuring-infa.html' title='BI Applications: Configuring INFA Connections in DAC'/><author><name>Manjunath RG</name><uri>http://www.blogger.com/profile/02411602361604062965</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/-iw4Dw-2Td38/ThQPhPkU_zI/AAAAAAAACBg/VHHP2Mbxqto/s220/Copy%2Bof%2Bcalvin66.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-7933521873819430752</id><published>2010-12-31T14:38:00.000+05:30</published><updated>2010-12-31T14:38:40.099+05:30</updated><title type='text'>BI Applications: Privileges within a PLSQL procedure</title><content type='html'>&lt;a href="http://obiapplications.blogspot.com/2010/12/privileges-within-plsql-procedure.html?spref=bl"&gt;BI Applications: Privileges within a PLSQL procedure&lt;/a&gt;: "Oracle expects that we mention explicitly what kind of privileges the PLSQL procedure has. If we do not specify it properly there are chance..."&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-7933521873819430752?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://obiapplications.blogspot.com/2010/12/privileges-within-plsql-procedure.html?spref=bl' title='BI Applications: Privileges within a PLSQL procedure'/><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/7933521873819430752/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2010/12/bi-applications-privileges-within-plsql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/7933521873819430752'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/7933521873819430752'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2010/12/bi-applications-privileges-within-plsql.html' title='BI Applications: Privileges within a PLSQL procedure'/><author><name>Manjunath RG</name><uri>http://www.blogger.com/profile/02411602361604062965</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/-iw4Dw-2Td38/ThQPhPkU_zI/AAAAAAAACBg/VHHP2Mbxqto/s220/Copy%2Bof%2Bcalvin66.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-8977342301196438391</id><published>2010-12-31T14:32:00.000+05:30</published><updated>2010-12-31T14:32:06.330+05:30</updated><title type='text'>BI Applications: Accessing Table Names of other Schemas</title><content type='html'>&lt;a href="http://obiapplications.blogspot.com/2010/12/accessing-table-names-of-other-schemas.html?spref=bl"&gt;BI Applications: Accessing Table Names of other Schemas&lt;/a&gt;: "Many times we would want to select the table names from another schema. In such cases below SELECT would help..  select TABLE_NAME FROM ALL_..."&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-8977342301196438391?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://obiapplications.blogspot.com/2010/12/accessing-table-names-of-other-schemas.html?spref=bl' title='BI Applications: Accessing Table Names of other Schemas'/><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/8977342301196438391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2010/12/bi-applications-accessing-table-names.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/8977342301196438391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/8977342301196438391'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2010/12/bi-applications-accessing-table-names.html' title='BI Applications: Accessing Table Names of other Schemas'/><author><name>Manjunath RG</name><uri>http://www.blogger.com/profile/02411602361604062965</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/-iw4Dw-2Td38/ThQPhPkU_zI/AAAAAAAACBg/VHHP2Mbxqto/s220/Copy%2Bof%2Bcalvin66.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-1144223374915428362</id><published>2010-12-02T22:02:00.000+05:30</published><updated>2010-12-02T22:02:51.214+05:30</updated><title type='text'>BI Applications: Database Character Set of a DB</title><content type='html'>&lt;a href="http://obiapplications.blogspot.com/2010/12/database-character-set-of-db.html?spref=bl"&gt;BI Applications: Database Character Set of a DB&lt;/a&gt;: "This query will help in finding the database character set of an oracle db.  Select value from SYS.NLS_DATABASE_PARAMETERS where PARAMETER =..."&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-1144223374915428362?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://obiapplications.blogspot.com/2010/12/database-character-set-of-db.html?spref=bl' title='BI Applications: Database Character Set of a DB'/><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/1144223374915428362/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2010/12/bi-applications-database-character-set.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/1144223374915428362'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/1144223374915428362'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2010/12/bi-applications-database-character-set.html' title='BI Applications: Database Character Set of a DB'/><author><name>Manjunath RG</name><uri>http://www.blogger.com/profile/02411602361604062965</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/-iw4Dw-2Td38/ThQPhPkU_zI/AAAAAAAACBg/VHHP2Mbxqto/s220/Copy%2Bof%2Bcalvin66.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-6212636762764764950</id><published>2010-11-15T18:19:00.000+05:30</published><updated>2010-11-15T18:19:40.132+05:30</updated><title type='text'>BI Applications: Difference Between COALESCE and NVL</title><content type='html'>&lt;a href="http://obiapplications.blogspot.com/2010/11/difference-between-coalesce-and-nvl.html?spref=bl"&gt;BI Applications: Difference Between COALESCE and NVL&lt;/a&gt;: "COALESCE and NVL are used to achieve the same functionality of providing a default value in case the column returns a NULL.  The differences..."&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-6212636762764764950?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://obiapplications.blogspot.com/2010/11/difference-between-coalesce-and-nvl.html?spref=bl' title='BI Applications: Difference Between COALESCE and NVL'/><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/6212636762764764950/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2010/11/bi-applications-difference-between.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/6212636762764764950'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/6212636762764764950'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2010/11/bi-applications-difference-between.html' title='BI Applications: Difference Between COALESCE and NVL'/><author><name>Manjunath RG</name><uri>http://www.blogger.com/profile/02411602361604062965</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/-iw4Dw-2Td38/ThQPhPkU_zI/AAAAAAAACBg/VHHP2Mbxqto/s220/Copy%2Bof%2Bcalvin66.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-1960106598420406516</id><published>2010-09-13T14:51:00.000+05:30</published><updated>2010-09-13T14:51:04.829+05:30</updated><title type='text'>BI Applications: TO_CHAR(date column) returns zero</title><content type='html'>&lt;a href="http://obiapplications.blogspot.com/2010/09/tochardate-column-returns-zero.html?spref=bl"&gt;BI Applications: TO_CHAR(date column) returns zero&lt;/a&gt;: "In Oracle Database we face this issue sometimes. We see that Date field contains all zeros Example - select to_char(Date_column,'dd-mm-yyyy ..."&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-1960106598420406516?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://obiapplications.blogspot.com/2010/09/tochardate-column-returns-zero.html?spref=bl' title='BI Applications: TO_CHAR(date column) returns zero'/><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/1960106598420406516/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2010/09/bi-applications-tochardate-column.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/1960106598420406516'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/1960106598420406516'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2010/09/bi-applications-tochardate-column.html' title='BI Applications: TO_CHAR(date column) returns zero'/><author><name>Manjunath RG</name><uri>http://www.blogger.com/profile/02411602361604062965</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/-iw4Dw-2Td38/ThQPhPkU_zI/AAAAAAAACBg/VHHP2Mbxqto/s220/Copy%2Bof%2Bcalvin66.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-6503270777336385378</id><published>2010-09-08T16:36:00.003+05:30</published><updated>2010-09-08T16:36:44.495+05:30</updated><title type='text'>BI Applications: Unsupported conversion Error for INFA maps on Orac...</title><content type='html'>&lt;a href="http://obiapplications.blogspot.com/2010/09/unsupported-conversion-error-for-infa.html?spref=bl"&gt;BI Applications: Unsupported conversion Error for INFA maps on Orac...&lt;/a&gt;: "If your ETL tasks are failing with error as Unsupported conversion Error and log mentions something like below - ORA-26097: unsupported conv..."&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-6503270777336385378?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://obiapplications.blogspot.com/2010/09/unsupported-conversion-error-for-infa.html?spref=bl' title='BI Applications: Unsupported conversion Error for INFA maps on Orac...'/><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/6503270777336385378/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2010/09/bi-applications-unsupported-conversion.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/6503270777336385378'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/6503270777336385378'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2010/09/bi-applications-unsupported-conversion.html' title='BI Applications: Unsupported conversion Error for INFA maps on Orac...'/><author><name>Manjunath RG</name><uri>http://www.blogger.com/profile/02411602361604062965</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/-iw4Dw-2Td38/ThQPhPkU_zI/AAAAAAAACBg/VHHP2Mbxqto/s220/Copy%2Bof%2Bcalvin66.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-8592956581435792244</id><published>2010-09-08T16:36:00.002+05:30</published><updated>2010-09-08T16:36:35.301+05:30</updated><title type='text'>BI Applications: Debug the Debugger of INFA</title><content type='html'>&lt;a href="http://obiapplications.blogspot.com/2010/09/debug-debugger-of-infa.html?spref=bl"&gt;BI Applications: Debug the Debugger of INFA&lt;/a&gt;: "Many times we face issues while using the debugger feature of Informatica.  We get error saying 'Error connecting to DTM Service'  There are..."&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-8592956581435792244?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://obiapplications.blogspot.com/2010/09/debug-debugger-of-infa.html?spref=bl' title='BI Applications: Debug the Debugger of INFA'/><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/8592956581435792244/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2010/09/bi-applications-debug-debugger-of-infa.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/8592956581435792244'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/8592956581435792244'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2010/09/bi-applications-debug-debugger-of-infa.html' title='BI Applications: Debug the Debugger of INFA'/><author><name>Manjunath RG</name><uri>http://www.blogger.com/profile/02411602361604062965</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/-iw4Dw-2Td38/ThQPhPkU_zI/AAAAAAAACBg/VHHP2Mbxqto/s220/Copy%2Bof%2Bcalvin66.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-7423010725789127259</id><published>2010-09-08T16:36:00.001+05:30</published><updated>2010-09-08T16:36:20.764+05:30</updated><title type='text'>BI Applications: DAC - For First Timers</title><content type='html'>&lt;a href="http://obiapplications.blogspot.com/2010/06/dac-for-first-timers.html?spref=bl"&gt;BI Applications: DAC - For First Timers&lt;/a&gt;: "DAC is the Datawarehouse Administration Console which is an important component of the OBIA stack.  To understand DAC and learn all its feat..."&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-7423010725789127259?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://obiapplications.blogspot.com/2010/06/dac-for-first-timers.html?spref=bl' title='BI Applications: DAC - For First Timers'/><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/7423010725789127259/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2010/09/bi-applications-dac-for-first-timers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/7423010725789127259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/7423010725789127259'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2010/09/bi-applications-dac-for-first-timers.html' title='BI Applications: DAC - For First Timers'/><author><name>Manjunath RG</name><uri>http://www.blogger.com/profile/02411602361604062965</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/-iw4Dw-2Td38/ThQPhPkU_zI/AAAAAAAACBg/VHHP2Mbxqto/s220/Copy%2Bof%2Bcalvin66.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-6814220557040369639</id><published>2010-09-08T16:36:00.000+05:30</published><updated>2010-09-08T16:36:09.562+05:30</updated><title type='text'>BI Applications: Oracle BI Applications</title><content type='html'>&lt;a href="http://obiapplications.blogspot.com/2010/06/oracle-bi-applications.html?spref=bl"&gt;BI Applications: Oracle BI Applications&lt;/a&gt;: "I have faced this question many times.  What is Oracle BI Applications.  In simple words its a prebuilt BI solution which can support multip..."&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-6814220557040369639?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://obiapplications.blogspot.com/2010/06/oracle-bi-applications.html?spref=bl' title='BI Applications: Oracle BI Applications'/><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/6814220557040369639/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2010/09/bi-applications-oracle-bi-applications.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/6814220557040369639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/6814220557040369639'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2010/09/bi-applications-oracle-bi-applications.html' title='BI Applications: Oracle BI Applications'/><author><name>Manjunath RG</name><uri>http://www.blogger.com/profile/02411602361604062965</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/-iw4Dw-2Td38/ThQPhPkU_zI/AAAAAAAACBg/VHHP2Mbxqto/s220/Copy%2Bof%2Bcalvin66.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-4869527307371197622</id><published>2010-04-05T00:13:00.000+05:30</published><updated>2010-04-05T00:14:17.337+05:30</updated><title type='text'>Converting multiple rows into a single comma separated row</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: verdana, Geneva, Arial, Verdana, sans-serif; font-size: 11px; "&gt;&lt;div style="text-align: justify; "&gt;&lt;span class="Apple-style-span" style="font-family: arial; "&gt;&lt;span class="Apple-style-span" style="font-size: small; "&gt;Recently, I have been bitten by the MSDN forums bug. I enjoy spending time in the SSAS and SSRS forums, and the learning that I take out from there is tremendous. Initially, I just used to read and learn, while now I reply to a lot of posts too (just the simple ones, keep the tough ones for the experts to solve ;) ).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify; "&gt;&lt;span class="Apple-style-span" style="font-family: arial; "&gt;&lt;span class="Apple-style-span" style="font-size: small; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify; "&gt;&lt;span class="Apple-style-span" style="font-family: arial; "&gt;&lt;span class="Apple-style-span" style="font-size: small; "&gt;So the other day, there was this post - how can you convert multiple rows into a single comma separated row? For eg,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify; "&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://4.bp.blogspot.com/_TMh7Ez9bsn0/S7jbWwlWaUI/AAAAAAAAAlQ/tQ7hk8cuveU/s320/Blog_Img1.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5456352132604520770" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 320px; height: 82px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial; "&gt;&lt;span class="Apple-style-span" style="font-size: small; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial; "&gt;&lt;span class="Apple-style-span" style="font-size: small; "&gt;This can be done by the FOR XML command.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial; "&gt;&lt;span class="Apple-style-span" style="font-size: small; "&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 16px; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial; "&gt;&lt;span class="Apple-style-span" style="font-size: small; "&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 16px; "&gt;select State, (&lt;br /&gt;select City + ',' as [text()]&lt;br /&gt;from tableA soi&lt;br /&gt;where soi.State=t.State&lt;br /&gt;order by City&lt;br /&gt;for xml path( '' )&lt;br /&gt;)&lt;br /&gt;from tableA s )t&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify; "&gt;&lt;span class="Apple-style-span" style="font-size: small; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify; "&gt;&lt;span class="Apple-style-span" style="font-size: small; "&gt;A handy command, especially because you don't have to use stored procedures to achieve the result.&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-4869527307371197622?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/4869527307371197622/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2010/04/converting-multiple-rows-into-single.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/4869527307371197622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/4869527307371197622'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2010/04/converting-multiple-rows-into-single.html' title='Converting multiple rows into a single comma separated row'/><author><name>Jason Thomas</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/_TMh7Ez9bsn0/SccWymuXtWI/AAAAAAAAAb8/da2bAUASXjU/S220/exp1.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_TMh7Ez9bsn0/S7jbWwlWaUI/AAAAAAAAAlQ/tQ7hk8cuveU/s72-c/Blog_Img1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-1705652588358737292</id><published>2009-01-01T14:31:00.002+05:30</published><updated>2009-01-01T14:39:41.778+05:30</updated><title type='text'>Stagnation</title><content type='html'>&lt;span style="font-family:trebuchet ms;"&gt;Well it's been quite a while since I posted anything here and quite frankly it's been quite a while since I found anything worth posting. My work occupies most of my time and it seems like I have lost that zeal to learn and try out new stuff. So,as part of this year's resolution, I have decided to hit the books again! Hopefully you will see a new post coming from me soon.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;Meanwhile, I just thought of sharing this link with all of you. I hit this link during my inital training days and have found this quite useful.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://learndatamodeling.com/"&gt;http://learndatamodeling.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;font-size:85%;color:#000000;"&gt;Regards,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;font-size:85%;color:#000000;"&gt;Chandan&lt;/span&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="font-family:times new roman;font-size:85%;color:#000000;"&gt;'Knowledge should not be speculative, it should be certainty'&lt;/span&gt;&lt;/em&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-1705652588358737292?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/1705652588358737292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2009/01/stagnation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/1705652588358737292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/1705652588358737292'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2009/01/stagnation.html' title='Stagnation'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/09950913670610398632</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://4.bp.blogspot.com/_HTobQr6dZNo/StsGyi3YgkI/AAAAAAAADiE/N6fiozBkUHg/S220/Snorkeling1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-203117270972188198</id><published>2008-07-23T22:35:00.005+05:30</published><updated>2008-07-23T22:59:03.534+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='Strangest of bugs'/><title type='text'>Union woes</title><content type='html'>&lt;span style="font-weight: bold;font-family:lucida grande;" &gt;Silly Me!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:lucida grande;"&gt;I always thought a Union should and would accept a Select clause that is exactly identical w.r.t number of columns, data types and &lt;/span&gt;&lt;span style="font-style: italic;font-family:lucida grande;" &gt;column names&lt;/span&gt;&lt;span style="font-family:lucida grande;"&gt;. i.e if I want to say display the list of all employees who are in Salary Grade 'A' and the list of employees who are in HR Department in the same result set (for some strange reason) I was expecting this to be the correct query:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0);font-family:courier new;" &gt;SELECT&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0);font-family:courier new;" &gt;           E.EMPLOYEE_NAME,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0);font-family:courier new;" &gt;           S.SAL_GRADE AS GRADE_DEPT&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0);font-family:courier new;" &gt;FROM   EMPLOYEE E , SALARY_GRADE S&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0);font-family:courier new;" &gt;WHERE E.SAL &gt; S.LOW_SAL&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0);font-family:courier new;" &gt;   AND E.SAL &lt; S.HIGH_SAL&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   &lt;span style="color: rgb(153, 0, 0);"&gt;AND S.SAL_GRADE = 'A'&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0);font-family:courier new;" &gt;UNION&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0);font-family:courier new;" &gt;SELECT &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0);font-family:courier new;" &gt;      E.EMPLOYEE_NAME,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0);font-family:courier new;" &gt;      D.DEPT_NAME AS GRADE_DEPT&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0);font-family:courier new;" &gt;FROM    EMPLOYEE E, DEPARTMENT D&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0);font-family:courier new;" &gt;WHERE  E.DEPT_CODE = D.DEPT_CODE&lt;/span&gt;&lt;br /&gt;       &lt;span style="color: rgb(153, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);font-family:courier new;" &gt;AND D.DEPT_CODE = 'HR' &lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;font-family:courier new;" &gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:lucida grande;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);font-family:courier new;" &gt;&lt;span style="font-family:lucida grande;"&gt;But apparently my assumption made using my "profound knowledge" was wrong. All a Union requires is for the number of columns and the data type of the columns in the Select list to be the same (refer &lt;/span&gt;&lt;a style="font-family: lucida grande;" href="http://en.wikipedia.org/wiki/Union_%28SQL%29"&gt;Wiki&lt;/a&gt;&lt;span style="font-family:lucida grande;"&gt;). So even if I interchange the columns in the second query above, the query will still run and give results, but not necessarily the results you would want!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:lucida grande;"&gt;I learn this the hard way after discovering a stange bug in one of the reports that I had developed. After looking into the SQL I realized that I had interchanged the column names in one of the SQLs in the Union. The SQL still worked fine because each query was still having equal number of columns and same data types for each column! &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:lucida grande;"&gt;Felt like pulling my hair out after discovering the bug!&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-203117270972188198?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/203117270972188198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2008/07/union-woes.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/203117270972188198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/203117270972188198'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2008/07/union-woes.html' title='Union woes'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/09950913670610398632</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://4.bp.blogspot.com/_HTobQr6dZNo/StsGyi3YgkI/AAAAAAAADiE/N6fiozBkUHg/S220/Snorkeling1.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-1078426251814178436</id><published>2008-07-17T17:38:00.000+05:30</published><updated>2008-07-17T18:05:01.131+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='issue'/><category scheme='http://www.blogger.com/atom/ns#' term='correlated'/><category scheme='http://www.blogger.com/atom/ns#' term='update'/><title type='text'>Correlated Update : A tricky Situation</title><content type='html'>Hi Folks,&lt;br /&gt;&lt;br /&gt;Long time no see, any post.&lt;br /&gt;Last day I saw a bewildering issue. It may not strike some of you if you already know it.&lt;br /&gt;But i thought this should be shared.&lt;br /&gt;&lt;br /&gt;In a correlated update :&lt;br /&gt;eg:&lt;br /&gt;UPDATE MASTER_ORDERS X&lt;br /&gt;SET QTY=(SELECT Y.QTY&lt;br /&gt;FROM ORDERS Y&lt;br /&gt;WHERE X.ORDER_NUM = Y.ORDER_NUM);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We know one thing ; that is it will scan the whole table and consider each row for updating.&lt;br /&gt;But in this case if the inner query returns not result, still the update will complete. It will update even the row for which the inner query did not give any data with NULL. Some kind of force update .Hence resulting in loss of data.&lt;br /&gt;Tom Kyte  says this not the right way to do such an update.&lt;br /&gt;&lt;br /&gt;To avoid this there are two methods:&lt;br /&gt;&lt;br /&gt;- Use an updatable join (updatable view), if the row to be updated is key preserved (i.e; only one row is fetched for the join condition).&lt;br /&gt;&lt;br /&gt;- Use an exists clause in the outer where condition, so that only records with change are picked for update. It also makes the query faster as the update is done on a smaller subset.&lt;br /&gt;&lt;br /&gt;UPDATE MASTER_ORDERS X&lt;br /&gt;SET QTY=(SELECT Y.QTY&lt;br /&gt;FROM ORDERS Y&lt;br /&gt;WHERE X.ORDER_NUM = Y.ORDER_NUM)&lt;br /&gt;WHERE EXISTS (SELECT 1&lt;br /&gt;FROM ORDERS Y&lt;br /&gt;WHERE X.ORDER_NUM = Y.ORDER_NUM);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-1078426251814178436?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/1078426251814178436/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2008/07/correlated-update-tricky-situation.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/1078426251814178436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/1078426251814178436'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2008/07/correlated-update-tricky-situation.html' title='Correlated Update : A tricky Situation'/><author><name>Rahul Nair</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KHvJHM2ebug/AAAAAAAAAAI/AAAAAAAAG6k/asNt3mUthVw/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-1073670852291957728</id><published>2008-04-01T15:45:00.007+05:30</published><updated>2008-04-01T17:19:50.431+05:30</updated><title type='text'>Insufficient Privileges in Stored Procedures</title><content type='html'>Hello All,&lt;br /&gt;I came across an intersting problem.&lt;br /&gt;There are two roles CONNECT and RESOURCE given to user xxx.&lt;br /&gt;The problem is while creating a view dynamically through named procedures,i get insufficient privileges error&lt;br /&gt;ex:create or replace procedure stg_proc as&lt;br /&gt;begin&lt;br /&gt;execute immediate 'create or replace view stg_view as select * from stg_dummy';&lt;br /&gt;end;&lt;br /&gt;SQL&gt; /&lt;br /&gt;Procedure created.&lt;br /&gt;SQL&gt; exec stg_proc;&lt;br /&gt;BEGIN stg_proc; END;&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-01031: insufficient privileges&lt;br /&gt;ORA-06512: at "STB_STAGING.STG_PROC", line 3&lt;br /&gt;ORA-06512: at line 1&lt;br /&gt;but the strange thing was, there was no error with anonymous procedure block while creatng the view dynamically&lt;br /&gt;ex:begin&lt;br /&gt;execute immediate 'create or replace view stg_view as select * from stg_dummy';&lt;br /&gt;end;&lt;br /&gt;SQL&gt; /&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;The reason why this happens is&lt;br /&gt;&lt;a name="DBSEG50010"&gt;&lt;strong&gt;PL/SQL Blocks and Roles&lt;/strong&gt;&lt;/a&gt;&lt;br /&gt;&lt;a name="1007309"&gt;&lt;/a&gt;The use of roles in a PL/SQL block depends on whether it is an anonymous block or a named block (stored procedure, function, or trigger), and whether it executes with definer's rights or invoker's rights.&lt;br /&gt;&lt;a name="1007314"&gt;&lt;/a&gt;&lt;strong&gt;Named Blocks with Definer's Rights&lt;br /&gt;&lt;/strong&gt;&lt;a name="1007317"&gt;&lt;/a&gt;All roles are disabled in any named PL/SQL block (stored procedure, function, or trigger) that executes with definer's rights. Roles are not used for privilege checking and you cannot set roles within a definer's rights procedure.&lt;br /&gt;&lt;a name="1007319"&gt;&lt;/a&gt;The SESSION_ROLES view shows all roles that are currently enabled. If a named PL/SQL block that executes with definer's rights queries SESSION_ROLES, the query does not return any rows.&lt;br /&gt;&lt;a name="1007334"&gt;&lt;/a&gt;&lt;strong&gt;Anonymous Blocks with Invoker's Rights&lt;br /&gt;&lt;/strong&gt;&lt;a name="1007338"&gt;&lt;/a&gt;Named PL/SQL blocks that execute with invoker's rights and anonymous PL/SQL blocks are executed based on privileges granted through enabled roles. Current roles are used for privilege checking within an invoker's rights PL/SQL block, and you can use dynamic SQL to set a role in the session.&lt;br /&gt;There are 2 solutions to the above problem &lt;br /&gt;1)AUTHID as CURRENT_USER&lt;br /&gt;2)Grant CREATE VIEW permission to xxx.&lt;br /&gt;ex:create or replace procedure stg_proc AUTHID CURRENT_USER as&lt;br /&gt;begin&lt;br /&gt;execute immediate 'create or replace view stg_view as select * from stg_dummy';&lt;br /&gt;end;&lt;br /&gt;Procedure created.&lt;br /&gt;SQL&gt; exec stg_proc;&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;For further information can be found at &lt;a href="http://stanford.edu/dept/itss/docs/oracle/10g/network.101/b10773/authoriz.htm#1007305"&gt;http://stanford.edu/dept/itss/docs/oracle/10g/network.101/b10773/authoriz.htm#1007305&lt;/a&gt;&lt;br /&gt;Hope it helps....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-1073670852291957728?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/1073670852291957728/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2008/04/insufficient-privilages-in-stored.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/1073670852291957728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/1073670852291957728'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2008/04/insufficient-privilages-in-stored.html' title='Insufficient Privileges in Stored Procedures'/><author><name>Krishna</name><uri>http://www.blogger.com/profile/09992563543671396647</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://4.bp.blogspot.com/_G962Vq5SnUg/Sx3OBDLwvVI/AAAAAAAAAZ0/4woyfc_PjzE/S220/04-12-09_1211.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-703604081925935488</id><published>2007-12-31T18:34:00.000+05:30</published><updated>2008-01-01T11:45:15.975+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Database'/><category scheme='http://www.blogger.com/atom/ns#' term='Indexes'/><title type='text'>Difference between a Primary Key and a Unique Index</title><content type='html'>The differences between a Primary Key and a Unique Index are:&lt;br /&gt;1) Column(s) that make the Primary Key of a table cannot be NULL since by definition, the Primary Key cannot be NULL since it helps uniquely identify the record in the table. The column(s) that make up the unique index can be nullable. A note worth mentioning over here is that different RDBMS treat this differently –&gt; while SQL Server and DB2 do not allow more than one NULL value in a unique index column, Oracle allows multiple NULL values. That is one of the things to look out for when designing/developing/porting applications across RDBMS.&lt;br /&gt;2) There can be only one Primary Key defined on the table where as you can have many unique indexes defined on the table (if needed).&lt;br /&gt;3) Also, in the case of SQL Server, if you go with the default options then a Primary Key is created as a clustered index while the unique index (constraint) is created as a non-clustered index.&lt;br /&gt;This is just the default behavior though and can be changed at creation time, if needed.&lt;br /&gt;So, if the unique index is defined on not null column(s), then it is essentially the same as the Primary Key and can be treated as an alternate key meaning it can also serve the purpose of identifying a record uniquely in the table.&lt;br /&gt;&lt;br /&gt;I have directly picked the above information from &lt;a href="http://decipherinfosys.wordpress.com/2007/07/04/back-to-the-basics-difference-between-primary-key-and-unique-index/"&gt;http://decipherinfosys.wordpress.com/2007/07/04/back-to-the-basics-difference-between-primary-key-and-unique-index/&lt;/a&gt; link.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-703604081925935488?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/703604081925935488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2007/12/difference-between-primary-key-and.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/703604081925935488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/703604081925935488'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2007/12/difference-between-primary-key-and.html' title='Difference between a Primary Key and a Unique Index'/><author><name>Krishna</name><uri>http://www.blogger.com/profile/09992563543671396647</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://4.bp.blogspot.com/_G962Vq5SnUg/Sx3OBDLwvVI/AAAAAAAAAZ0/4woyfc_PjzE/S220/04-12-09_1211.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-4518244085580706337</id><published>2007-11-25T23:19:00.000+05:30</published><updated>2007-11-29T12:56:48.940+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Indexes'/><title type='text'>Selectivity Factor - Block Selectivity</title><content type='html'>Hello everyone.&lt;br /&gt;&lt;br /&gt;I was just reading through an article on Indexes, and as I was reading it I realized that I had a mistake in my earlier post where I had claimed that Row selectivity is an important factor to consider while deciding on Indexes. As you know , Indexes are only helpful if they help in reducing the number of IO(physical or logical). Lets consider the case of Oracle. In Oracle, data in a table is stored in blocks. Lets assume a case where each block hold only 100 rows of a table. If there 1000 rows in a table, then assume that these are stored in 10 different blocks. In this case, even if a filter has a low selectivity (say 10%), having an index will result in 10 IOs  per block(for 10 rows in each ). If Oracle had decided to do a Full Table scan, then it would have resulted in just 10 IOs as a whole. My point here is, instead of taking Row selectivity as a decision making parameter, Indexing decisions have to be based on something known as Block selectivity. A simple definition of Block selectivity is :&lt;br /&gt;&lt;br /&gt;Block selectivity = P/Ptotal&lt;br /&gt;where P = Number of blocks which have atleast 1 row which qualifies the filter condition.&lt;br /&gt;Ptotal = Total number of blocks below the high water mark of the table.&lt;br /&gt;&lt;br /&gt;The lesser the block selectivity for a field, the better the performance will be if the field is indexed. One way to ensure a good block selectivity is to physically cluster the data along this field. A good clustering factor will ensure that the rows with same value for this field are physically close and in a lesser number of blocks. On the other hand , if these rows were spread across almost the entire set of blocks, then an Index may prove as an overhead as each block would have to be visited only once. In fact a full table scan would ensure that each block is read once and only once. So people, next time you are planning to index a field make sure to physically cluster the data in the table and find out the block selectivity for this field. For more information refer this link:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.hotsos.com/e-library/abstract.php?id=5"&gt;http://www.hotsos.com/e-library/abstract.php?id=5&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;P.S: You will have to register to read this article. Registration is very simple and will take only 1 min of your time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-4518244085580706337?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/4518244085580706337/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2007/11/selectivity-factor.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/4518244085580706337'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/4518244085580706337'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2007/11/selectivity-factor.html' title='Selectivity Factor - Block Selectivity'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/09950913670610398632</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://4.bp.blogspot.com/_HTobQr6dZNo/StsGyi3YgkI/AAAAAAAADiE/N6fiozBkUHg/S220/Snorkeling1.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-3448806794938166070</id><published>2007-11-02T11:06:00.000+05:30</published><updated>2007-11-02T11:12:48.915+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='Database'/><title type='text'>Moving To New Tablespace.</title><content type='html'>Hi Guys,&lt;br /&gt;&lt;br /&gt;This is a small thing. But may be useful.&lt;br /&gt;When we move tables and indexes to another tablespace, what all needs to be done (Oracle queries are used).&lt;br /&gt;1) move the table.&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;alter table &lt;/span&gt;&lt;span style="font-style: italic; color: rgb(0, 153, 0);"&gt;tablename &lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;move tablespace &lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;tablespacename;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;2)&lt;/span&gt;&lt;/span&gt; now the indexes are of no use. You have to rebuild them in the new table space.&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;alter index &lt;/span&gt;&lt;span style="font-style: italic; color: rgb(0, 153, 0);"&gt;indexname &lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;rebuild &lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;tablespacename;&lt;/span&gt;&lt;br /&gt;3)&lt;/span&gt; Finally the packages need to be recompile. There is no need for explicit compilation as during execution it  will be recompiled. &lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;alter package &lt;/span&gt;&lt;span style="font-style: italic; color: rgb(0, 153, 0);"&gt;packagename &lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;compile package;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Thats it!!&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-3448806794938166070?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/3448806794938166070/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2007/11/moving-to-new-tablespace.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/3448806794938166070'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/3448806794938166070'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2007/11/moving-to-new-tablespace.html' title='Moving To New Tablespace.'/><author><name>Rahul Nair</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KHvJHM2ebug/AAAAAAAAAAI/AAAAAAAAG6k/asNt3mUthVw/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-5167628179499644475</id><published>2007-10-11T11:05:00.000+05:30</published><updated>2007-10-11T14:18:53.071+05:30</updated><title type='text'>Insert Data Into 2 tables at 1 shot</title><content type='html'>Hi All,&lt;br /&gt;&lt;br /&gt;Have you ever wondered how to insert data into 2 tables from one table at one shot?&lt;br /&gt;&lt;br /&gt;oracle provides a feature called INSERT ALL.....&lt;br /&gt;&lt;br /&gt;I have used the above concept like this.&lt;br /&gt;&lt;br /&gt;I insert good data into the fact table along with their rowid's into rowid_tab table at one shot.&lt;br /&gt;&lt;br /&gt;Then i insert the data into reject table whose rowid's are not present in the rowid_tab.&lt;br /&gt;&lt;br /&gt;ex: To Insert data into fact table and rowid table....&lt;br /&gt;INSERT /*+ APPEND */ ALL&lt;br /&gt;INTO TABLE_FACT(col1,&lt;br /&gt;col2,&lt;br /&gt;col3)&lt;br /&gt;VALUES( col1.val,&lt;br /&gt;col2.val,&lt;br /&gt;col3.val )&lt;br /&gt;INTO ROWID_TAB(ROWID_COL) VALUES(ROWID)&lt;br /&gt;SELECT col1,&lt;br /&gt;col2,&lt;br /&gt;col3,&lt;br /&gt;rowid&lt;br /&gt;FROM TABLE_STG&lt;br /&gt;WHERE Cond1 &lt;cond1&gt;AND Cond2...&lt;cond2&gt;;&lt;br /&gt;&lt;br /&gt;To insert data into Reject table&lt;br /&gt;&lt;br /&gt;INSERT /*+ APPEND */ ALL&lt;br /&gt;INTO TABLE_FACT_REJ(col1,&lt;br /&gt;col2,&lt;br /&gt;col3)&lt;br /&gt;VALUES( col1.val,&lt;br /&gt;col2.val,&lt;br /&gt;col3.val )&lt;br /&gt;SELECT col1,&lt;br /&gt;col2,&lt;br /&gt;col3,&lt;br /&gt;rowid&lt;br /&gt;FROM TABLE_STG&lt;br /&gt;WHERE rowid NOT IN (SELECT ROWID_COL&lt;br /&gt;FROM ROWID_TAB);&lt;br /&gt;&lt;br /&gt;Another improvisation can be to make ROWID_TAB as a Global Temporary table.&lt;br /&gt;&lt;br /&gt;For more imformation on this,please refer the links below&lt;br /&gt;1.&lt;a href="http://certcities.com/editorial/columns/story.asp?EditorialsID=51"&gt;http://certcities.com/editorial/columns/story.asp?EditorialsID=51&lt;/a&gt;&lt;br /&gt;2.&lt;a href="http://www.dba-oracle.com/t_global_temporary_tables.htm"&gt;http://www.dba-oracle.com/t_global_temporary_tables.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Hope this helps....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-5167628179499644475?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/5167628179499644475/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2007/10/insert-data-into-2-tables-at-1-shot.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/5167628179499644475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/5167628179499644475'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2007/10/insert-data-into-2-tables-at-1-shot.html' title='Insert Data Into 2 tables at 1 shot'/><author><name>Krishna</name><uri>http://www.blogger.com/profile/09992563543671396647</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://4.bp.blogspot.com/_G962Vq5SnUg/Sx3OBDLwvVI/AAAAAAAAAZ0/4woyfc_PjzE/S220/04-12-09_1211.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-8923724460195278007</id><published>2007-10-10T21:32:00.000+05:30</published><updated>2007-10-18T12:04:58.839+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Database'/><category scheme='http://www.blogger.com/atom/ns#' term='Indexes'/><title type='text'>Selectivity factor when deciding on Indexes</title><content type='html'>&lt;p class="MsoNormal"&gt;&lt;span style="font-family:Arial;"&gt;Ever wondered how you should arrive at the indexing strategy to be used in your warehouse? What are the parameters to be considered while deciding on the fields to be indexed. Well,one parameter which I feel is important to consider is what I call as the 'Selectivity Factor'. The following is the definition of Selectivity factor( this is just my way of definition so no way of corroborating this)&lt;br /&gt;&lt;br /&gt;Selectivity factor for a field - Percentage of rows selected from the table after applying the filter on the field.&lt;br /&gt;&lt;br /&gt;You have to keep in mind that this factor will be different for different values of the same field. But again, you will have an estimate of the number of rows in the table for each of these values, so you can take an average of the Selectivity factor.The Average selectivity factor for a field is always the same irrespective of the SQL in which it is used.&lt;br /&gt;&lt;br /&gt;Now if you have many SQLs having the same kind of filter ( a date field for example), then it makes sense to have an index on that field, right? Not always! What if the filter qualifies 90% of the records most of the time , then there will be no point in having that filter.In fact it will be an overhead, as the Database will first scan the index list then hit the actual row ids. If suppose you use a B*Tree index, then you might end up doing a very high number of logical I/Os, which will translate to reading the same set of blocks multiple times. But if you were reading only 10% of the table, then the number of logical I/Os will come down drastically. For example, suppose you have a query like this:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Select * from list_of_politicians where sex = 'M'&lt;br /&gt;&lt;br /&gt;In this case the field "sex" has a cardinality of 2 -'M','F' (assuming there is no ambiguity about this data!). Assume that the table has 1,00,000 records out of which 90000 are with 'M' and 10000 with 'F'. Suppose the block size is 8kB and the row size is 80 bytes(which means 100rows/block ) then approximately 1000 block are used for the table.In this case, the query is returning 90% of the table. If the B*Tree index is used in this case then, a logical I/O is done for each of the 90000 records, which means on an average each block gets read 90 times!!! this will be a huge performance hit.Whereas if it had done a Full table scan, the execution would have been much faster.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;That is where I feel , "Selectivity factor" makes much more sense as a quantifiable parameter to use for taking that decision. In the above scenario, the selectivity factor is 90% in case of 'M' and 10% in case of 'F' which means the Average Selectivity factor is 50%. This is a high number and thus not suited for B*Tree indexes. On the other hand ,a Bitmap index will be very useful in this scenario. In a bitmap index, each index entry will store references to many rows.The bitmap structure is something like this:&lt;br /&gt;&lt;br /&gt;Row 1 2 3 4 5 6 7 8&lt;br /&gt;&lt;br /&gt;M 0 1 1 1 1 1 1 1&lt;br /&gt;F 1 0 0 0 0 0 0 0&lt;br /&gt;&lt;br /&gt;As you can see there are only two entries here in the index.The first entry shows that the value 'M' is appearing in rows 2,3,4,5,6,7,8 and the value 'F' in row 1. So if I run the query,&lt;br /&gt;&lt;br /&gt;Select * from list_of_politicians where sex = 'M'&lt;br /&gt;&lt;br /&gt;the db can easily get the rowids of all the rows which have values 'M' for sex by reading only a few index entries( there will be more than one entry per value of a field based on the number of rows and the storage size). This will perform much much faster than in case of a B*Tree index.&lt;br /&gt;&lt;br /&gt;So to sum it up,&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;When the selectivity factor(or the average selectivity factor) for the field is low ( say less than 10%) and &lt;span style="font-size:+0;"&gt;&lt;/span&gt;a small portion of the table is selected, then it is helpful to have a B*Tree index on the field.&lt;?xml:namespace prefix = o /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:Arial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;When the selectivity factor(or the average selectivity factor) for the field is high (say greater than 25 %)  and you are selecting  a small to medium portion of the table then it useful to have a Bitmap index on this field.&lt;br /&gt;&lt;br /&gt;On the other hand , if the selectivity factor is high and you are reading a large portion of the table then it is better to leave the field alone.&lt;br /&gt;&lt;br /&gt;Now all this applies to a Rule based optimizer. If you are using a Cost based optimizer, then just analyzing the table before running the query will tell the optimizer whether to use the index or not. So in the above case, where you are selecting 90% of the records, if the table is analyzed before running the query, then the CBO will decide to do a Full table Scan instead of using the B*tree index.&lt;br /&gt;&lt;br /&gt;So next time you are planning your indexes, make sure to study the data, know the cardinality of the fields and also the Average Selectivity factor of the fields.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-8923724460195278007?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/8923724460195278007/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2007/10/selectivity-factor-when-deciding-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/8923724460195278007'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/8923724460195278007'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2007/10/selectivity-factor-when-deciding-on.html' title='Selectivity factor when deciding on Indexes'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/09950913670610398632</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://4.bp.blogspot.com/_HTobQr6dZNo/StsGyi3YgkI/AAAAAAAADiE/N6fiozBkUHg/S220/Snorkeling1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-2297937347837647791</id><published>2007-10-09T19:44:00.000+05:30</published><updated>2007-10-10T21:31:37.007+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='Advanced SQL'/><title type='text'>Concatenation on group by</title><content type='html'>Hi all,&lt;br /&gt;As an extension to Chandan's previous post i would like to post this sample code which shows the usage of sys_connect_by_path operator in Oracle.&lt;br /&gt;&lt;br /&gt;Using  &lt;strong&gt;SYS_CONNECT_BY_PATH&lt;/strong&gt; operator&lt;br /&gt;&lt;br /&gt;Source table “temp”:&lt;br /&gt;&lt;br /&gt;Name     Deptno&lt;br /&gt;------     -------&lt;br /&gt;jagan       1&lt;br /&gt;guru        2&lt;br /&gt;varu        2&lt;br /&gt;bharath  1&lt;br /&gt;manju     1&lt;br /&gt;giri          3&lt;br /&gt;chandan 3&lt;br /&gt;&lt;br /&gt;SELECT             &lt;br /&gt;deptno,  substr(SYS_CONNECT_BY_PATH(name, ','),2) name_list&lt;br /&gt;FROM           &lt;br /&gt;  (&lt;br /&gt;    SELECT  name,&lt;br /&gt;                    deptno,&lt;br /&gt;                    count(*) OVER ( partition by deptno ) cnt,&lt;br /&gt;                    ROW_NUMBER () OVER ( partition by deptno order by name) seq&lt;br /&gt;    FROM   temp&lt;br /&gt;    WHERE  deptno is not null&lt;br /&gt;  )&lt;br /&gt;WHERE           &lt;br /&gt;         seq = cnt&lt;br /&gt;START WITH           &lt;br /&gt;        seq=1&lt;br /&gt;CONNECT BY PRIOR          &lt;br /&gt;          seq+1 = seq&lt;br /&gt;AND PRIOR           &lt;br /&gt;         deptno = deptno;&lt;br /&gt;&lt;br /&gt;Result:&lt;br /&gt;deptno   Name_list&lt;br /&gt;-------   -------------&lt;br /&gt;1             bharath,jagan,manju&lt;br /&gt;2             guru,varun&lt;br /&gt;3             chandan,giri&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-2297937347837647791?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/2297937347837647791/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2007/10/concatenation-on-group-by_09.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/2297937347837647791'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/2297937347837647791'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2007/10/concatenation-on-group-by_09.html' title='Concatenation on group by'/><author><name>Jagannath</name><uri>http://www.blogger.com/profile/16445000207838976863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_f1rSfOGDqf8/StyLrAHEIiI/AAAAAAAABtw/u5kr9jXdcL8/S220/Jump-Higher-1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-65057110691262352</id><published>2007-10-04T22:39:00.000+05:30</published><updated>2007-10-04T23:10:03.211+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='Advanced SQL'/><title type='text'>Concatenation on group by</title><content type='html'>Hi,&lt;br /&gt;    I had this requirement in my project to group by a column of a table and produce a concatenation of row values for a second column for each group. For example consider a table with two columns:&lt;br /&gt;&lt;br /&gt;Department      Employee&lt;br /&gt;1                               Chandan&lt;br /&gt;1                                   Jagannath&lt;br /&gt;2                                    Rahul&lt;br /&gt;2                                    Pradeep&lt;br /&gt;2                                    Manjunath&lt;br /&gt;&lt;br /&gt;I want the result like this:&lt;br /&gt;&lt;br /&gt;Department        Name_List&lt;br /&gt;1                                  Chandan ,Jagannath&lt;br /&gt;2                                  Rahul,Pradeep,Manjunath&lt;br /&gt;&lt;br /&gt;And since this was in SQL SERVER 2000 , there was no recursive query and I had to write using sql only. I finally wrote it by transposing the rows and then concatenating the result. Something like:&lt;br /&gt;&lt;br /&gt;Department    Name1            Name2           Name3&lt;br /&gt;1                             Chandan        Jagannath        -&lt;br /&gt;2                             Rahul                 Pradeep           Manjunath&lt;br /&gt;&lt;br /&gt;As you can see, here there is a fundamental limit. How many columns will you consider for transposing as you don't know how many rows are there for each department. Well the only way to proceed is to find the maximum count of rows for any department and transpose it to that many (or more) number of columns. I did just that and it worked.&lt;br /&gt;&lt;br /&gt;Now in Oracle there is something called SYS_CONNECT_BY_PATH which can be sued with a recursive query to achieve this. But wonders of wonders , MYSQL has a function called GROUP_CONCAT which does exactly this. A concatenation of rows for each group. Now I am changing my perception of MySql. With features like this, it is easily the coolest database for developers. May be it is not ideal for Data warehouses but who cares about that!!&lt;br /&gt;&lt;br /&gt;So if you guys ever come across this kind of requirement in Oracle or MySQL make sure to use these features:)&lt;br /&gt;&lt;br /&gt;See this links for more:&lt;br /&gt;Oracle&lt;br /&gt; http://www.oracle.com/technology/oramag/code/tips2006/101606.html&lt;br /&gt;MySQL http://www.oreillynet.com/databases/blog/2007/05/debunking_group_by_myths.html&lt;br /&gt;&lt;br /&gt;Enjoy!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-65057110691262352?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/65057110691262352/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2007/10/concatenation-on-group-by.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/65057110691262352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/65057110691262352'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2007/10/concatenation-on-group-by.html' title='Concatenation on group by'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/09950913670610398632</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://4.bp.blogspot.com/_HTobQr6dZNo/StsGyi3YgkI/AAAAAAAADiE/N6fiozBkUHg/S220/Snorkeling1.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-7452202803576048269</id><published>2007-09-07T12:21:00.000+05:30</published><updated>2007-09-07T16:22:15.327+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='BO'/><category scheme='http://www.blogger.com/atom/ns#' term='Reporting'/><category scheme='http://www.blogger.com/atom/ns#' term='Crystal reports'/><title type='text'>Crystal Reports- +ve's and -ve's</title><content type='html'>Crystal reports is a very popular Reporting tool. Below is an attempt to measure its effectiveness in reporting.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;+ve's&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;The simplicity of the tool.The tool asks for a connection and once you provide it either to a DB or a cube the report can be filled up through drag and drop of the fileds.&lt;/li&gt;&lt;li&gt;The parameter feature can be used for Yes/No questions etc as it does not have any radio buttons kind of feature.&lt;/li&gt;&lt;li&gt;The supress feature can be used extensively to get various functionalities. It depends on how and where you use it.&lt;/li&gt;&lt;li&gt;The formula fields can be used in tandem with supress feature and parameters,this can make many complex things simpler.&lt;/li&gt;&lt;li&gt;There are feature like on demand subreports(hyperlink to other reports) or normal subreports as well.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;-ve's&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Deleting any unused parameters is a pain sometimes as they dont get deleted and cause problems later&lt;/li&gt;&lt;li&gt;Only one level of sub report nesting is available.(You cant have subreport within a subreport)&lt;/li&gt;&lt;li&gt;We can have only one query for a report.(We cant have separate queries for different measures as in BO)&lt;/li&gt;&lt;li&gt;Aliases can be added but they really act weirdly.(so avoid them)&lt;/li&gt;&lt;li&gt;Formatting the report takes double the report development time.&lt;/li&gt;&lt;li&gt;Tables cant be added to the report(Lines have to be drawn..!!!)&lt;/li&gt;&lt;li&gt;Export feature is good only for PDF format. For other formats you cant even compare the report and the exported copy.&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-7452202803576048269?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/7452202803576048269/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2007/09/crystal-reports-ves-and-ves.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/7452202803576048269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/7452202803576048269'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2007/09/crystal-reports-ves-and-ves.html' title='Crystal Reports- +ve&apos;s and -ve&apos;s'/><author><name>Manjunath RG</name><uri>http://www.blogger.com/profile/02411602361604062965</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/-iw4Dw-2Td38/ThQPhPkU_zI/AAAAAAAACBg/VHHP2Mbxqto/s220/Copy%2Bof%2Bcalvin66.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-7407337837038081047</id><published>2007-09-05T17:01:00.000+05:30</published><updated>2007-09-05T17:53:07.214+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='pl/sql'/><title type='text'>T-SQL : Sweet and Sour</title><content type='html'>I have working on SQL server 2005 (t-sql) lately. This blog is a comparison between the pl/sql features available in t-sql,db2 v 8.2 and oracle 9i pl/sql.&lt;br /&gt;This blog will be updated when anything new turns up.&lt;br /&gt;So here goes...&lt;br /&gt;&lt;table str="" style="border-collapse: collapse; width: 589pt;" border="0" cellpadding="0" cellspacing="0" width="784"&gt;&lt;col style="width: 53pt;" width="70"&gt;  &lt;col style="width: 178pt;" width="237"&gt;  &lt;col style="width: 162pt;" width="216"&gt;  &lt;col style="width: 90pt;" width="120"&gt;  &lt;col style="width: 106pt;" width="141"&gt;  &lt;tbody&gt;&lt;tr style="height: 12.75pt;" height="17"&gt;      &lt;td class="xl25" style="width: 178pt;" width="237"&gt;&lt;br /&gt;&lt;/td&gt;   &lt;td class="xl25" colspan="3" style="width: 358pt; font-weight: bold; text-align: center;" width="477"&gt;&lt;br /&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;" height="17"&gt;      &lt;td&gt;  &lt;table str="" style="border-collapse: collapse; width: 363pt;" border="0" cellpadding="0" cellspacing="0" width="484"&gt;&lt;col style="width: 17pt;" width="23"&gt;  &lt;col style="width: 98pt;" width="130"&gt;  &lt;col style="width: 116pt;" width="155"&gt;  &lt;col style="width: 61pt;" width="81"&gt;  &lt;col style="width: 71pt;" width="95"&gt;  &lt;tbody&gt;&lt;tr style="height: 24pt;" height="32"&gt;   &lt;td class="xl28" style="height: 24pt; width: 17pt; font-weight: bold;" height="32" width="23"&gt;#&lt;/td&gt;   &lt;td class="xl29" style="width: 98pt; font-weight: bold;" width="130"&gt;Feature&lt;/td&gt;   &lt;td class="xl29" style="width: 116pt; font-weight: bold;" width="155"&gt;Available in SQL server 2005?&lt;/td&gt;   &lt;td class="xl29" style="width: 61pt; font-weight: bold;" width="81"&gt;DB2&lt;/td&gt;   &lt;td class="xl29" style="width: 71pt; font-weight: bold;" width="95"&gt;Oracle&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;" height="17"&gt;   &lt;td class="xl30" style="height: 12.75pt; color: rgb(51, 51, 255);" num="" align="right" height="17"&gt;1&lt;/td&gt;   &lt;td class="xl31" style="width: 98pt; color: rgb(51, 51, 255);" width="130"&gt;Exception handling&lt;/td&gt;   &lt;td class="xl31" style="width: 116pt; color: rgb(51, 51, 255);" width="155"&gt;Yes.&lt;/td&gt;   &lt;td class="xl31" style="width: 61pt; color: rgb(51, 51, 255);" width="81"&gt;yes&lt;/td&gt;   &lt;td class="xl31" style="width: 71pt; color: rgb(51, 51, 255);" width="95"&gt;yes&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;" height="17"&gt;   &lt;td class="xl30" style="height: 12.75pt; color: rgb(51, 51, 255);" num="" align="right" height="17"&gt;2&lt;/td&gt;   &lt;td class="xl31" style="width: 98pt; color: rgb(51, 51, 255);" width="130"&gt;Transaction&lt;/td&gt;   &lt;td class="xl31" style="width: 116pt; color: rgb(51, 51, 255);" width="155"&gt;Yes.&lt;/td&gt;   &lt;td class="xl31" style="width: 61pt; color: rgb(51, 51, 255);" width="81"&gt;yes&lt;/td&gt;   &lt;td class="xl31" style="width: 71pt; color: rgb(51, 51, 255);" width="95"&gt;yes&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;" height="17"&gt;   &lt;td class="xl24" style="height: 12.75pt; color: rgb(255, 0, 0);" num="" align="right" height="17"&gt;3&lt;/td&gt;   &lt;td class="xl27" style="width: 98pt; color: rgb(255, 0, 0);" str="ELSIF construct " width="130"&gt;ELSIF   construct&lt;span style=""&gt; &lt;/span&gt;&lt;/td&gt;   &lt;td class="xl27" style="width: 116pt; color: rgb(255, 0, 0);" width="155"&gt;No&lt;/td&gt;   &lt;td class="xl27" style="width: 61pt; color: rgb(255, 0, 0);" width="81"&gt;yes&lt;/td&gt;   &lt;td class="xl27" style="width: 71pt; color: rgb(255, 0, 0);" width="95"&gt;yes&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;" height="17"&gt;   &lt;td class="xl25" style="height: 12.75pt; color: rgb(0, 102, 0);" num="" align="right" height="17"&gt;4&lt;/td&gt;   &lt;td class="xl26" style="width: 98pt; color: rgb(0, 102, 0);" width="130"&gt;IF exists ()&lt;/td&gt;   &lt;td class="xl26" style="width: 116pt; color: rgb(0, 102, 0);" width="155"&gt;Yes.&lt;/td&gt;   &lt;td class="xl26" style="width: 61pt; color: rgb(0, 102, 0);" width="81"&gt;yes&lt;/td&gt;   &lt;td class="xl26" style="width: 71pt; color: rgb(0, 102, 0);" width="95"&gt;no&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;" height="17"&gt;   &lt;td class="xl30" style="height: 12.75pt; color: rgb(51, 51, 255);" num="" align="right" height="17"&gt;5&lt;/td&gt;   &lt;td class="xl31" style="width: 98pt; color: rgb(51, 51, 255);" width="130"&gt;Max column size&lt;/td&gt;   &lt;td class="xl31" style="width: 116pt; color: rgb(51, 51, 255);" num="" align="right" width="155"&gt;32000&lt;/td&gt;   &lt;td class="xl31" style="width: 61pt; color: rgb(51, 51, 255);" num="" align="right" width="81"&gt;32000&lt;/td&gt;   &lt;td class="xl31" style="width: 71pt; color: rgb(51, 51, 255);" num="" align="right" width="95"&gt;4000&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;" height="17"&gt;   &lt;td class="xl24" style="height: 12.75pt; color: rgb(255, 0, 0);" num="" align="right" height="17"&gt;6&lt;/td&gt;   &lt;td class="xl27" style="width: 98pt; color: rgb(255, 0, 0);" str="Implicit Cursor " width="130"&gt;Implicit   Cursor&lt;span style=""&gt; &lt;/span&gt;&lt;/td&gt;   &lt;td class="xl27" style="width: 116pt; color: rgb(255, 0, 0);" width="155"&gt;No&lt;/td&gt;   &lt;td class="xl27" style="width: 61pt; color: rgb(255, 0, 0);" width="81"&gt;Yes&lt;/td&gt;   &lt;td class="xl27" style="width: 71pt; color: rgb(255, 0, 0);" width="95"&gt;Yes&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 25.5pt;" height="34"&gt;   &lt;td class="xl30" style="height: 25.5pt;" num="" align="right" height="34"&gt;7&lt;/td&gt;   &lt;td class="xl31" style="width: 98pt; color: rgb(51, 51, 255);" width="130"&gt;Recursive query&lt;/td&gt;   &lt;td class="xl31" style="width: 116pt; color: rgb(51, 51, 255);" width="155"&gt;Yes. Similar to db2 but only 100   literations&lt;/td&gt;   &lt;td class="xl31" style="width: 61pt; color: rgb(51, 51, 255);" width="81"&gt;yes&lt;/td&gt;   &lt;td class="xl31" style="width: 71pt; color: rgb(51, 51, 255);" width="95"&gt;yes : using connect byprior&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;" height="17"&gt;   &lt;td class="xl25" style="height: 12.75pt; color: rgb(0, 102, 0);" num="" align="right" height="17"&gt;8&lt;/td&gt;   &lt;td class="xl26" style="width: 98pt; color: rgb(0, 102, 0);" width="130"&gt;Print Command&lt;/td&gt;   &lt;td class="xl26" style="width: 116pt; color: rgb(0, 102, 0);" width="155"&gt;Yes&lt;/td&gt;   &lt;td class="xl26" style="width: 61pt; color: rgb(0, 102, 0);" width="81"&gt;No&lt;/td&gt;   &lt;td class="xl26" style="width: 71pt; color: rgb(0, 102, 0);" width="95"&gt;Yes&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;" height="17"&gt;   &lt;td class="xl30" style="height: 12.75pt;" num="" align="right" height="17"&gt;9&lt;/td&gt;   &lt;td class="xl31" style="width: 98pt; color: rgb(51, 51, 255);" width="130"&gt;Dynamic SQL&lt;/td&gt;   &lt;td class="xl31" style="width: 116pt; color: rgb(51, 51, 255);" width="155"&gt;Yes&lt;/td&gt;   &lt;td class="xl31" style="width: 61pt; color: rgb(51, 51, 255);" width="81"&gt;Yes&lt;/td&gt;   &lt;td class="xl31" style="width: 71pt; color: rgb(51, 51, 255);" width="95"&gt;Yes&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;" height="17"&gt;   &lt;td class="xl30" style="height: 12.75pt;" num="" align="right" height="17"&gt;10&lt;/td&gt;   &lt;td class="xl31" style="width: 98pt; color: rgb(51, 51, 255);" str="Dynamic SQL STRING DATATYPE " width="130"&gt;Dynamic SQL STRING DATATYPE&lt;span style=""&gt; &lt;/span&gt;&lt;/td&gt;   &lt;td class="xl31" style="width: 116pt; color: rgb(51, 51, 255);" width="155"&gt;nvarchar and nchar&lt;/td&gt;   &lt;td class="xl31" style="width: 61pt; color: rgb(51, 51, 255);" width="81"&gt;varchar&lt;/td&gt;   &lt;td class="xl31" style="width: 71pt; color: rgb(51, 51, 255);" width="95"&gt;varchar&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;" height="17"&gt;   &lt;td class="xl25" style="height: 12.75pt; color: rgb(0, 102, 0);" num="" align="right" height="17"&gt;11&lt;/td&gt;   &lt;td class="xl26" style="width: 98pt; color: rgb(0, 102, 0);" width="130"&gt;Variable and cursor name same&lt;/td&gt;   &lt;td class="xl26" style="width: 116pt; color: rgb(0, 102, 0);" width="155"&gt;yes&lt;/td&gt;   &lt;td class="xl26" style="width: 61pt; color: rgb(0, 102, 0);" width="81"&gt;yes&lt;/td&gt;   &lt;td class="xl26" style="width: 71pt; color: rgb(0, 102, 0);" width="95"&gt;no&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 33pt;" height="44"&gt;   &lt;td class="xl24" style="height: 33pt;" num="" align="right" height="44"&gt;12&lt;/td&gt;   &lt;td class="xl27" style="width: 98pt; color: rgb(255, 0, 0);" str="Default value while variable declaration " width="130"&gt;Default value while   variable declaration&lt;span style=""&gt; &lt;/span&gt;&lt;/td&gt;   &lt;td class="xl27" style="width: 116pt; color: rgb(255, 0, 0);" width="155"&gt;no&lt;/td&gt;   &lt;td class="xl27" style="width: 61pt; color: rgb(255, 0, 0);" width="81"&gt;yes&lt;/td&gt;   &lt;td class="xl27" style="width: 71pt; color: rgb(255, 0, 0);" width="95"&gt;yes&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;" height="17"&gt;   &lt;td class="xl24" style="height: 12.75pt;" num="" align="right" height="17"&gt;13&lt;/td&gt;   &lt;td class="xl27" style="width: 98pt; color: rgb(255, 0, 0);" width="130"&gt;Sequences&lt;/td&gt;   &lt;td class="xl27" style="width: 116pt; color: rgb(255, 0, 0);" width="155"&gt;No&lt;/td&gt;   &lt;td class="xl27" style="width: 61pt; color: rgb(255, 0, 0);" width="81"&gt;Yes&lt;/td&gt;   &lt;td class="xl27" style="width: 71pt; color: rgb(255, 0, 0);" width="95"&gt;yes&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;" height="17"&gt;   &lt;td style="height: 12.75pt;" height="17"&gt;&lt;br /&gt;&lt;/td&gt;   &lt;td&gt;&lt;br /&gt;&lt;/td&gt;   &lt;td&gt;&lt;br /&gt;&lt;/td&gt;   &lt;td&gt;&lt;br /&gt;&lt;/td&gt;   &lt;td&gt;&lt;br /&gt;&lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;/td&gt;   &lt;td&gt;&lt;br /&gt;&lt;/td&gt;   &lt;td&gt;&lt;br /&gt;&lt;/td&gt;   &lt;td&gt;&lt;br /&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.75pt;" height="17"&gt;      &lt;td class="xl29" style="width: 178pt;" width="237"&gt;&lt;br /&gt;&lt;/td&gt;   &lt;td class="xl29" style="width: 162pt;" width="216"&gt;&lt;br /&gt;&lt;/td&gt;   &lt;td class="xl29" style="width: 90pt;" width="120"&gt;&lt;br /&gt;&lt;/td&gt;   &lt;td class="xl29" style="width: 106pt;" width="141"&gt;&lt;br /&gt;&lt;/td&gt;  &lt;/tr&gt;                           &lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-7407337837038081047?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/7407337837038081047/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2007/09/t-sql-sweet-and-sour.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/7407337837038081047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/7407337837038081047'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2007/09/t-sql-sweet-and-sour.html' title='T-SQL : Sweet and Sour'/><author><name>Rahul Nair</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KHvJHM2ebug/AAAAAAAAAAI/AAAAAAAAG6k/asNt3mUthVw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-2860851980716234580</id><published>2007-09-03T14:10:00.000+05:30</published><updated>2007-09-03T22:03:08.667+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Extracting parts from a Comma seperated string</title><content type='html'>&lt;span style="color: rgb(0, 0, 0);font-size:85%;" &gt;One of the requirements in our project was to extract individual column names from a string containing comma seperated values i.e if the string has say:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);font-size:85%;" &gt;v_column_string := ',country_code,country_name,country_descripton,'&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);font-size:85%;" &gt;I wanted to get each column name from this string. Here's how I wrote the query for that..&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);font-size:85%;" &gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);font-size:85%;" &gt;[CODE]&lt;br /&gt;SELECT * &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);font-size:85%;" &gt;FROM(&lt;br /&gt;SELECT &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);font-size:85%;" &gt;SUBSTR(v_column_string ,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);font-size:85%;" &gt;INSTR (v_column_string , ',' , 1 , A.LVL)+ 1,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);font-size:85%;" &gt;INSTR (v_column_string , ',' , 1 , A.LVL + 1 ) - &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);font-size:85%;" &gt;INSTR (v_column_string , ',' , 1, A.LVL)-1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);font-size:85%;" &gt;) AS COLUMNS&lt;br /&gt;FROM&lt;br /&gt;( SELECT ROWNUM LVL FROM ALL_OBJECTS WHERE ROWNUM &lt;= no_of_words)A&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);font-size:85%;" &gt;) B&lt;br /&gt;WHERE B.COLUMNS IS NOT NULL&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 102);font-family:courier new;" &gt;&lt;em&gt;OUTPUT :&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 102);font-family:courier new;" &gt;&lt;em&gt;country_code&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 102);font-family:courier new;" &gt;&lt;em&gt;country_name&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 102);font-family:courier new;" &gt;&lt;em&gt;country_desc&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;where no_of_words is the number of words in the String(in this case it is 3). In case you don't know how many words might be there, you can go ahead and give the length of the string here(although this will be an overhead as many nulls will be returned , which is why i have a filter for not null). &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;Notice that I have given the string with a leading and ending comma i.e ',country_code,country_name,country_desc,'. This is basically to extract the first word and the last. If you don't want to give these two comma's you can tweak the query to handle it.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;Hope you wil find this useful someday:)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);font-size:85%;" &gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);font-size:85%;" &gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-2860851980716234580?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/2860851980716234580/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2007/09/extracting-parts-from-comma-seperated.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/2860851980716234580'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/2860851980716234580'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2007/09/extracting-parts-from-comma-seperated.html' title='Extracting parts from a Comma seperated string'/><author><name>Chandan</name><uri>http://www.blogger.com/profile/09950913670610398632</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='20' height='32' src='http://4.bp.blogspot.com/_HTobQr6dZNo/StsGyi3YgkI/AAAAAAAADiE/N6fiozBkUHg/S220/Snorkeling1.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-2967734492288472581</id><published>2007-09-03T11:10:00.000+05:30</published><updated>2007-09-03T11:31:32.173+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='pl/sql'/><category scheme='http://www.blogger.com/atom/ns#' term='db2'/><title type='text'>CLOB Datatype</title><content type='html'>Ah!! The first Tech Post...&lt;br /&gt;Some time back, i had tried out some things to get the features of the CLOB datatype in DB2.&lt;br /&gt;I will share the details, so that you guys need not spend more time on it if in some point of time you need to find the features of CLOB.&lt;br /&gt;Some of the features are w.r.t storing a procedure text in a clob variable.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center; font-weight: bold;"&gt;    Features Of CLOB Variables   &lt;br /&gt;&lt;/div&gt;&lt;span style="font-weight: bold;"&gt;        &lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;No    Parameter        Supports&lt;/span&gt;&lt;br /&gt;1    Size                            upto 2GB - 1 byte&lt;br /&gt;&lt;br /&gt;2    Logging                    Yes&lt;br /&gt;&lt;br /&gt;3    Reading                    Directly from disk. Buffer Pool Not Used.&lt;br /&gt;&lt;br /&gt;4    Execute immediate&lt;br /&gt;    of DMLs specified in&lt;br /&gt;    CLOB                            Yes&lt;br /&gt;    &lt;span style="color: rgb(0, 102, 0);font-size:85%;" &gt;&lt;span style="font-family: courier new;"&gt;[Code]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    CREATE PROCEDURE GTT_CORE.CLOB_TEST&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    LANGUAGE SQL&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    BEGIN    &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        DECLARE V_CLOB CLOB;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        SET V_CLOB ='INSERT INTO GTT_CORE.DUMMY VALUES(1)';&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        EXECUTE IMMEDIATE V_CLOB;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    END&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;5    Compilation of Procedure&lt;br /&gt;    as dynamic statement            Yes&lt;br /&gt;    &lt;span style="color: rgb(0, 102, 0);font-size:85%;" &gt;&lt;span style="font-family: courier new;"&gt;[Code]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    BEGIN&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        DECLARE V_CLOB CLOB;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        SET V_CLOB =&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            'Create procedure GTT_CORE.PROC &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;             LANGUAGE SQL&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;             BEGIN&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                DECLARE V_COUNT INTEGER;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                SELECT COUNT(1) INTO V_COUNT FROM   GTT_CORE.DUMMY;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                INSERT INTO GTT_CORE.DUMMY VALUES (V_COUNT);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;             END';&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        EXECUTE IMMEDIATE V_CLOB;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    END&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;6    Indentation of procedure            Yes&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;7    Global Temporary Table &lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: right;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    With a CLOB column              NO.                 DB2 SQL error: SQLCODE: -350, SQLSTATE: 42962,SQLERRMC: V&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;                                                                        Message: LOB, DATALINK, or structured type column                                                                         ""V"" cannot be used in an  index, a key, a unique                                                                                 constraint, a functional dependency, a generated     column, or a  declared temporary table.  &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 102, 0); font-family: courier new;"&gt;              [Code]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0); font-family: courier new;"&gt;    DROP PROCEDURE GTT_CORE.CLOB_TEST&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0); font-family: courier new;"&gt;    GO&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0); font-family: courier new;"&gt;    CREATE PROCEDURE GTT_CORE.CLOB_TEST&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0); font-family: courier new;"&gt;    LANGUAGE SQL&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0); font-family: courier new;"&gt;    BEGIN&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0); font-family: courier new;"&gt;    DECLARE V_CLOB CLOB;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0); font-family: courier new;"&gt;    declare GLOBAL TEMPORARY TABLE DUMMY_CLOB (V CLOB) ON COMMIT PRESERVE ROWS NOT         LOGGED WITH REPLACE;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0); font-family: courier new;"&gt;    SET V_CLOB =&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0); font-family: courier new;"&gt;    'Create procedure GTT_CORE.PROC &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0); font-family: courier new;"&gt;     LANGUAGE SQL&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0); font-family: courier new;"&gt;     BEGIN&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0); font-family: courier new;"&gt;        DECLARE V_COUNT INTEGER;';&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0); font-family: courier new;"&gt;    SET V_CLOB = V_CLOB||' &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0); font-family: courier new;"&gt;        SELECT COUNT(1) &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0); font-family: courier new;"&gt;        INTO V_COUNT &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0); font-family: courier new;"&gt;        FROM GTT_CORE.DUMMY;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0); font-family: courier new;"&gt;        INSERT INTO GTT_CORE.DUMMY VALUES (V_COUNT);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0); font-family: courier new;"&gt;     END';&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0); font-family: courier new;"&gt;    insert into SESSION.DUMMY_CLOB values(v_clob);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0); font-family: courier new;"&gt;    END&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;8    Storage of CLOB in a table.&lt;br /&gt;        Is it with indentation??            Yes&lt;br /&gt;   &lt;span style="font-family: courier new; color: rgb(0, 102, 0);font-size:85%;" &gt; [Code]&lt;br /&gt;    DROP PROCEDURE GTT_CORE.CLOB_TEST&lt;br /&gt;    GO&lt;br /&gt;    CREATE PROCEDURE GTT_CORE.CLOB_TEST&lt;br /&gt;    LANGUAGE SQL&lt;br /&gt;    BEGIN&lt;br /&gt;        DECLARE V_CLOB CLOB;&lt;br /&gt;&lt;br /&gt;        SET V_CLOB =&lt;br /&gt;                'Create procedure GTT_CORE.PROC&lt;br /&gt;                 LANGUAGE SQL&lt;br /&gt;                 BEGIN&lt;br /&gt;                    DECLARE V_COUNT INTEGER;';&lt;br /&gt;        SET V_CLOB = V_CLOB||'&lt;br /&gt;                   SELECT COUNT(1)&lt;br /&gt;                        INTO V_COUNT&lt;br /&gt;                    FROM GTT_CORE.DUMMY;&lt;br /&gt;&lt;br /&gt;                    INSERT INTO GTT_CORE.DUMMY VALUES (V_COUNT);&lt;br /&gt;                   END';&lt;br /&gt;&lt;br /&gt;        insert into gtt_core.dummy1 values(v_clob);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    END&lt;/span&gt;&lt;br /&gt;       &lt;br /&gt;      &lt;br /&gt;Hope it will be useful someday&lt;br /&gt;&lt;br /&gt;-- Rahul Nair&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-2967734492288472581?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/2967734492288472581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2007/09/clob-datatype.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/2967734492288472581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/2967734492288472581'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2007/09/clob-datatype.html' title='CLOB Datatype'/><author><name>Rahul Nair</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KHvJHM2ebug/AAAAAAAAAAI/AAAAAAAAG6k/asNt3mUthVw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-450799382465599155</id><published>2007-09-01T21:55:00.001+05:30</published><updated>2007-09-01T22:04:56.664+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='info'/><title type='text'>Posting Guidelines</title><content type='html'>I have identified some posting guidelines to help us have better posts&lt;br /&gt;Authors&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Please Contribute through new posts. Don't Use comments section.&lt;/li&gt;&lt;li&gt;Reply to questions through Comments(responses) link.&lt;/li&gt;&lt;li&gt;Please Give appropriate labels&lt;/li&gt;&lt;/ol&gt;               Some labels can be : Oracle, DB2, SQL server, DW, Java,SQL,PL/SQL&lt;br /&gt;               Labels can help to find postings fast if there are too many :)&lt;br /&gt;&lt;br /&gt;Non Authors&lt;br /&gt;&lt;br /&gt;Please Post Question in Response link&lt;br /&gt;&lt;br /&gt;We can add to the above when need arises. But let us first kick this off to a good start.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-450799382465599155?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/450799382465599155/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2007/09/posting-guidelines.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/450799382465599155'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/450799382465599155'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2007/09/posting-guidelines.html' title='Posting Guidelines'/><author><name>Rahul Nair</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KHvJHM2ebug/AAAAAAAAAAI/AAAAAAAAG6k/asNt3mUthVw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4416629138379748150.post-7897244617579705689</id><published>2007-09-01T21:49:00.000+05:30</published><updated>2007-09-01T21:54:33.826+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='info'/><title type='text'>Knowlege Pool</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(102, 0, 0);"&gt;Welcome to Knowledege Pool Guys!!!&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 0, 0);"&gt;This is an Initiative for having a knowledge repository accessible, wherever you are.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 0, 0);"&gt;Learn .  Share and Question&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 0, 0);"&gt;So lets take it forward.....&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4416629138379748150-7897244617579705689?l=knowledge-pool.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-pool.blogspot.com/feeds/7897244617579705689/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledge-pool.blogspot.com/2007/09/knowlege-pool.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/7897244617579705689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4416629138379748150/posts/default/7897244617579705689'/><link rel='alternate' type='text/html' href='http://knowledge-pool.blogspot.com/2007/09/knowlege-pool.html' title='Knowlege Pool'/><author><name>Rahul Nair</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-KHvJHM2ebug/AAAAAAAAAAI/AAAAAAAAG6k/asNt3mUthVw/s512-c/photo.jpg'/></author><thr:total>5</thr:total></entry></feed>
