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

<channel>
	<title>GeeKs Blogging @ dotCOM &#187; Database</title>
	<atom:link href="http://geeksbloggingat.com/archives/practices/oracle/database-oracle/feed/" rel="self" type="application/rss+xml" />
	<link>http://geeksbloggingat.com</link>
	<description>Let&#039;s share...</description>
	<lastBuildDate>Tue, 30 Aug 2011 21:29:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Query on the Long Column or Field</title>
		<link>http://geeksbloggingat.com/2009/10/07/query-on-the-long-column-or-field/</link>
		<comments>http://geeksbloggingat.com/2009/10/07/query-on-the-long-column-or-field/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 19:56:13 +0000</pubDate>
		<dc:creator>Nitin Jain</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[ORACLE]]></category>
		<category><![CDATA[Siebel CRM]]></category>
		<category><![CDATA[Siebel]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[Workarounds]]></category>

		<guid isPermaLink="false">http://geeksbloggingat.com/?p=829</guid>
		<description><![CDATA[A typical problem in any EAI project. Others too!! One of the most common ways of building custom Error Handling or Logging mechanisms include dumping huge messages and XMLs in the database for future reference. It works as an excellent logging mechanism which can be pulled out in case something in the system fails. This [...]


<b>Related posts:<b><ol><li><a href='http://geeksbloggingat.com/2009/06/07/siebel-eim-nomenclature-of-custom-column/' rel='bookmark' title='Permanent Link: Siebel EIM &#8211; Nomenclature of Custom Column'>Siebel EIM &#8211; Nomenclature of Custom Column</a> <small>Previous post regarding new custom columns mapping in EIM table...</small></li>
<li><a href='http://geeksbloggingat.com/2009/06/02/siebel-eim-custom-column-mapping/' rel='bookmark' title='Permanent Link: Siebel EIM &#8211; Custom column mapping'>Siebel EIM &#8211; Custom column mapping</a> <small>It&#8217;s a very basic concept explaining how we can generate...</small></li>
<li><a href='http://geeksbloggingat.com/2009/05/31/siebel-fins-industry-xml-query-service/' rel='bookmark' title='Permanent Link: Siebel &#8211; FINS Industry XML Query Service'>Siebel &#8211; FINS Industry XML Query Service</a> <small>&#8220;Extracting values from a tag deep down in the Hierarchy.&#8221;...</small></li>
<li><a href='http://geeksbloggingat.com/2009/05/12/siebel-looping-multiple-records-query-and-process/' rel='bookmark' title='Permanent Link: Siebel &#8211; Looping multiple records &#8211; Query and Process'>Siebel &#8211; Looping multiple records &#8211; Query and Process</a> <small>In my last post, I discussed as to how we...</small></li>
<li><a href='http://geeksbloggingat.com/2009/04/23/siebel-showing-red-asterisk-on-a-conditional-required-field/' rel='bookmark' title='Permanent Link: Siebel &#8211; Showing red asterisk on a conditionally required field'>Siebel &#8211; Showing red asterisk on a conditionally required field</a> <small>In Siebel vanilla Application, we see a red asterisk (...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>A typical problem in any EAI project. Others too!!</p>
<p>One of the most common ways of building custom Error Handling or Logging mechanisms include dumping huge messages and XMLs in the database for future reference. It works as an excellent logging mechanism which can be pulled out in case something in the system fails.</p>
<p><span id="more-829"></span>This is generally achieved by using the &#8220;Long&#8221; column of the Oracle Database, and/or concatening multiple String type of columns. </p>
<p>Now, the typical problem. We dump the XMLs, fair enough. However, we can only pull out specific information from this XML and populate on some other columns, but, definitely not ALL the data in the huge XML that we have. We may pull out the Order Id, Reference Number and a couple of more fields, yet we definitely cannot drill out all the information.</p>
<p>However, the XML contains a lot more data. How do we query on the data in the Long column, in case the information is hidden deep into the XML, and is not saved separately in a String type column? I am assuming the Table based Logging mechanism.</p>
<p>I ran across something similar recently when I realized that I could not query on the Long Database column. Now, I have not discovered a special way of querying on the Long column that I am going to share here. Rather, this is a workaround.</p>
<p>Query for the relevant data in a traditional PL/SQL Editor like the SQL Developer or TOAD. You can still not run a query on the Long data type of column, but, with sufficient filters, you can reach out to a limited RecordSet around the actual record.</p>
<p>Right click -> Export -> TXT / CSV format and open the newly created file in a file editor. Run our favourite &#8220;Find..&#8221; tool to query for the exact data that you are looking for. And, voila, it could help you get as close to the actual record as possible.</p>
<p>Yeah, I agree if some of you out there are shouting, &#8220;Dumb, dumb, dumb tip!!&#8221;. But then, worked for me. <img src='http://geeksbloggingat.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>I had this typical interface which was just dumping XMLs in the Logs one after the other, without any identifiers. And, it was becoming terribly difficult to dig out the XML with a particular identifier. After all else that I could think of failed, this one worked like a charm.</p>
<p>I thank all my friends who were with me till late night, helping me get this through! Thanks, Madhvi. Thanks, Himanshu. Cheers.. <img src='http://geeksbloggingat.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>


<p><b>Related posts:<b><ol><li><a href='http://geeksbloggingat.com/2009/06/07/siebel-eim-nomenclature-of-custom-column/' rel='bookmark' title='Permanent Link: Siebel EIM &#8211; Nomenclature of Custom Column'>Siebel EIM &#8211; Nomenclature of Custom Column</a> <small>Previous post regarding new custom columns mapping in EIM table...</small></li>
<li><a href='http://geeksbloggingat.com/2009/06/02/siebel-eim-custom-column-mapping/' rel='bookmark' title='Permanent Link: Siebel EIM &#8211; Custom column mapping'>Siebel EIM &#8211; Custom column mapping</a> <small>It&#8217;s a very basic concept explaining how we can generate...</small></li>
<li><a href='http://geeksbloggingat.com/2009/05/31/siebel-fins-industry-xml-query-service/' rel='bookmark' title='Permanent Link: Siebel &#8211; FINS Industry XML Query Service'>Siebel &#8211; FINS Industry XML Query Service</a> <small>&#8220;Extracting values from a tag deep down in the Hierarchy.&#8221;...</small></li>
<li><a href='http://geeksbloggingat.com/2009/05/12/siebel-looping-multiple-records-query-and-process/' rel='bookmark' title='Permanent Link: Siebel &#8211; Looping multiple records &#8211; Query and Process'>Siebel &#8211; Looping multiple records &#8211; Query and Process</a> <small>In my last post, I discussed as to how we...</small></li>
<li><a href='http://geeksbloggingat.com/2009/04/23/siebel-showing-red-asterisk-on-a-conditional-required-field/' rel='bookmark' title='Permanent Link: Siebel &#8211; Showing red asterisk on a conditionally required field'>Siebel &#8211; Showing red asterisk on a conditionally required field</a> <small>In Siebel vanilla Application, we see a red asterisk (...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://geeksbloggingat.com/2009/10/07/query-on-the-long-column-or-field/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ORACLE &#8211; DUAL Table</title>
		<link>http://geeksbloggingat.com/2009/08/10/oracle-dual-table/</link>
		<comments>http://geeksbloggingat.com/2009/08/10/oracle-dual-table/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 15:22:46 +0000</pubDate>
		<dc:creator>Nitin Jain</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[ORACLE]]></category>

		<guid isPermaLink="false">http://geeksbloggingat.com/?p=733</guid>
		<description><![CDATA[One of the first things that any introductory SQL tutorial teaches, is about the DUAL table in Oracle. It is the commonest of the lot, and extremely useful, I must say. The DUAL table is installed automatically with the standard Oracle Data Dictionary at the time of installing the ORACLE Database itself. I wanted to [...]


<b>Related posts:<b><ol><li><a href='http://geeksbloggingat.com/2009/07/11/oracle-siebel-certification-needs-hands-on-training-ii/' rel='bookmark' title='Permanent Link: Oracle Siebel Certification needs hands on training &#8211; II'>Oracle Siebel Certification needs hands on training &#8211; II</a> <small>Most of Oracle Certifications need a mandatory hands on training....</small></li>
<li><a href='http://geeksbloggingat.com/2009/07/23/oracle-11g-certification-coming-soon/' rel='bookmark' title='Permanent Link: Oracle 11g Certification coming soon'>Oracle 11g Certification coming soon</a> <small>Good news for all the Oracle 11g Database Administrator Certification...</small></li>
<li><a href='http://geeksbloggingat.com/2009/11/04/changes-to-the-oracle-homepage/' rel='bookmark' title='Permanent Link: Changes to the Oracle Homepage?'>Changes to the Oracle Homepage?</a> <small>Just browsing through the Internet, particularly the Oracle Homepage, http://www.oracle.com,...</small></li>
<li><a href='http://geeksbloggingat.com/2009/07/21/oracle-announces-new-release-of-coherence/' rel='bookmark' title='Permanent Link: ORACLE announces new release of Coherence'>ORACLE announces new release of Coherence</a> <small>Now, this is going to come as good news to...</small></li>
<li><a href='http://geeksbloggingat.com/2009/07/03/oracle-fusion-middleware-11g-released/' rel='bookmark' title='Permanent Link: Oracle Fusion Middleware 11g released'>Oracle Fusion Middleware 11g released</a> <small>Hi, We had shared the most happening news of the...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>One of the first things that any introductory SQL tutorial teaches, is about the DUAL table in Oracle. It is the commonest of the lot, and extremely useful, I must say. The DUAL table is installed automatically with the standard Oracle Data Dictionary at the time of installing the ORACLE Database itself.</p>
<p><span id="more-733"></span>I wanted to write an introductory article on Siebel EIM today, however,somehow, DUAL seemed to catch a bigger fantasy! In any case, proficiency in DB is just as much desired at times, as in Siebel Architecture. I tried a little dabbling around with this little table. I am summing up my findings here.</p>
<p>As I said before, the DUAL table is installed along with the Oracle Data Dictionary</p>
<p>After logging into Oracle, I described the table. I was using Oracle&#8217;s SQL Developer, so if you were expecting the SQL prompt here, I am sorry! <img src='http://geeksbloggingat.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><i>DESC DUAL</i></p>
<p>Output:<br />
<i><br />
desc dual<br />
Name	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;		Null?	  &nbsp;&nbsp;&nbsp;Type<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
DUMMY		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;					  VARCHAR2(1)                                                                                                                                                 </p>
<p>1 rows selected<br />
</i></p>
<p>Next statement, &#8220;SELECT *&#8221;..</p>
<p><i>SELECT * FROM DUAL</i></p>
<p>Output:<br />
<i><br />
DUMMY<br />
&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
X<br />
</i></p>
<p>I tried the above from my own login without any Admin priviledges on the Oracle DB and it seemed to work just as fine.<br />
DUAL table can be very useful with the many uses that it ca inherently be put to.</p>
<p>Finding out the System Date:</p>
<p><i>SELECT SYSDATE FROM DUAL</i></p>
<p>Output:<br />
<i><br />
SYSDATE<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
10-AUG-09<br />
</i></p>
<p>A number of system variables may be found out from the system this way, using the DUAL Table.</p>
<p>It can also be useful, if in case you want to output a particualar value in the output of an SQL Statement. For example:</p>
<p><i>SELECT &#8216;GEEKSBLOGGINGAT.COM&#8217; FROM DUAL</i></p>
<p>Output:<br />
<i><br />
&#8216;GEEKSBLOGGINGAT.COM&#8217;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
GEEKSBLOGGINGAT.COM<br />
</i></p>
<p>The above functionalities are of immense use, especially in the case of Siebel EIM where we need to twist the outputs as per our Business Requirements. One of the places it can be used is to set up the Headers to the SQL Output, while spooling it to a TXT file.</p>
<p>Now, the catch. Try doing the above on other tables, it will still work. Surprised?? However, we generally use DUAL in normal practice so as not to touch the other tables and tamper them by mistake. Also, DUAL will return exactly one record, while the other tables are likely to return much larger number of records, which could possibly keep varying with time.</p>
<p>There is obviously much more to the DUAL table. It is already available in detail on the <a href="http://oracle.com" target="_blank" rel="nofollow">Oracle website</a> for the more inquisitive. The above was only a brief introduction.</p>


<p><b>Related posts:<b><ol><li><a href='http://geeksbloggingat.com/2009/07/11/oracle-siebel-certification-needs-hands-on-training-ii/' rel='bookmark' title='Permanent Link: Oracle Siebel Certification needs hands on training &#8211; II'>Oracle Siebel Certification needs hands on training &#8211; II</a> <small>Most of Oracle Certifications need a mandatory hands on training....</small></li>
<li><a href='http://geeksbloggingat.com/2009/07/23/oracle-11g-certification-coming-soon/' rel='bookmark' title='Permanent Link: Oracle 11g Certification coming soon'>Oracle 11g Certification coming soon</a> <small>Good news for all the Oracle 11g Database Administrator Certification...</small></li>
<li><a href='http://geeksbloggingat.com/2009/11/04/changes-to-the-oracle-homepage/' rel='bookmark' title='Permanent Link: Changes to the Oracle Homepage?'>Changes to the Oracle Homepage?</a> <small>Just browsing through the Internet, particularly the Oracle Homepage, http://www.oracle.com,...</small></li>
<li><a href='http://geeksbloggingat.com/2009/07/21/oracle-announces-new-release-of-coherence/' rel='bookmark' title='Permanent Link: ORACLE announces new release of Coherence'>ORACLE announces new release of Coherence</a> <small>Now, this is going to come as good news to...</small></li>
<li><a href='http://geeksbloggingat.com/2009/07/03/oracle-fusion-middleware-11g-released/' rel='bookmark' title='Permanent Link: Oracle Fusion Middleware 11g released'>Oracle Fusion Middleware 11g released</a> <small>Hi, We had shared the most happening news of the...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://geeksbloggingat.com/2009/08/10/oracle-dual-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

