<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments for OraQA</title>
	<atom:link href="http://oraqa.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://oraqa.com</link>
	<description>Oracle Question and Answer</description>
	<pubDate>Sun, 06 Jul 2008 21:24:35 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>Comment on How to determine if the formula string contains balanced pairs of parentheses in SQL by Frank Zhou</title>
		<link>http://oraqa.com/2008/06/08/how-to-determine-if-the-formula-string-contains-balanced-pairs-of-parentheses-in-sql/#comment-239</link>
		<dc:creator>Frank Zhou</dc:creator>
		<pubDate>Tue, 10 Jun 2008 14:20:08 +0000</pubDate>
		<guid isPermaLink="false">http://oraqa.com/?p=258#comment-239</guid>
		<description>Gmyers,
     
       Your simpler method doesn't work,
it didn't put all cases into consideration.

For example when str_num = '1+)2+(3+4'


SQL&#62; select str_num,
  2  case when length(replace(str_num,')')) = length(replace(str_num,'('))
  3  then 'T' else 'F' end bal
  4  from ( select '1+)2+(3+4' str_num from dual);

STR_NUM   BAL
--------- -----
1+)2+(3+4 T

The correct answer should be "F".

Frank</description>
		<content:encoded><![CDATA[<p>Gmyers,</p>
<p>       Your simpler method doesn&#8217;t work,<br />
it didn&#8217;t put all cases into consideration.</p>
<p>For example when str_num = &#8216;1+)2+(3+4&#8242;</p>
<p>SQL&gt; select str_num,<br />
  2  case when length(replace(str_num,&#8217;)')) = length(replace(str_num,&#8217;('))<br />
  3  then &#8216;T&#8217; else &#8216;F&#8217; end bal<br />
  4  from ( select &#8216;1+)2+(3+4&#8242; str_num from dual);</p>
<p>STR_NUM   BAL<br />
&#8212;&#8212;&#8212; &#8212;&#8211;<br />
1+)2+(3+4 T</p>
<p>The correct answer should be &#8220;F&#8221;.</p>
<p>Frank</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to determine if the formula string contains balanced pairs of parentheses in SQL by gmyers</title>
		<link>http://oraqa.com/2008/06/08/how-to-determine-if-the-formula-string-contains-balanced-pairs-of-parentheses-in-sql/#comment-238</link>
		<dc:creator>gmyers</dc:creator>
		<pubDate>Mon, 09 Jun 2008 23:27:42 +0000</pubDate>
		<guid isPermaLink="false">http://oraqa.com/?p=258#comment-238</guid>
		<description>Or a simple
select str_num,
        case when length(replace(str_num,')')) = length(replace(str_num,'(')) 
            then 'T' else 'F' end bal
from test</description>
		<content:encoded><![CDATA[<p>Or a simple<br />
select str_num,<br />
        case when length(replace(str_num,&#8217;)')) = length(replace(str_num,&#8217;('))<br />
            then &#8216;T&#8217; else &#8216;F&#8217; end bal<br />
from test</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on What is the Latest version of Oracle HTML DB? by stewstryker</title>
		<link>http://oraqa.com/2006/01/16/what-is-the-latest-version-of-oracle-html-db/#comment-237</link>
		<dc:creator>stewstryker</dc:creator>
		<pubDate>Mon, 28 Apr 2008 21:57:02 +0000</pubDate>
		<guid isPermaLink="false">http://oraqa.com/2006/01/16/what-is-the-latest-version-of-oracle-html-db/#comment-237</guid>
		<description>Latest version is 3.1.  Man, this thread is old!</description>
		<content:encoded><![CDATA[<p>Latest version is 3.1.  Man, this thread is old!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Start Oracle from my account? by prashant.pawar</title>
		<link>http://oraqa.com/2006/01/17/start-oracle-from-my-account/#comment-236</link>
		<dc:creator>prashant.pawar</dc:creator>
		<pubDate>Thu, 10 Apr 2008 08:22:31 +0000</pubDate>
		<guid isPermaLink="false">http://oraqa.com/2006/01/17/start-oracle-from-my-account/#comment-236</guid>
		<description>I could able to resolve this issue. 
my files under $ORACLE_HOME/network/mesg/ were corrupted. copied from other server.  it resolved the issue.</description>
		<content:encoded><![CDATA[<p>I could able to resolve this issue.<br />
my files under $ORACLE_HOME/network/mesg/ were corrupted. copied from other server.  it resolved the issue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to pass ARRAYS of records from Java/Tomcat to Oracle by vasunj</title>
		<link>http://oraqa.com/2008/03/18/how-to-pass-arrays-of-records-from-javatomcat-to-oracle/#comment-235</link>
		<dc:creator>vasunj</dc:creator>
		<pubDate>Thu, 20 Mar 2008 01:37:49 +0000</pubDate>
		<guid isPermaLink="false">http://oraqa.com/2008/03/18/how-to-pass-arrays-of-records-from-javatomcat-to-oracle/#comment-235</guid>
		<description>you really did a splendid job by posting!i really appreciate ur help dude!by the way i have been using thin driver and it works fine for me.But i was supposed to use oracle oci driver.and this array descriptor doesnt work.i was getting an error object not found or is marked for delete.

ArrayDescriptor descp= ArrayDescriptor.createDescriptor("schemaname.EMP_TYP_TABLE",dconn).

       oci:217300  object schemaname.EMP_TYP_TABLE is not found  or is marked for delete.can u plz help me with this !</description>
		<content:encoded><![CDATA[<p>you really did a splendid job by posting!i really appreciate ur help dude!by the way i have been using thin driver and it works fine for me.But i was supposed to use oracle oci driver.and this array descriptor doesnt work.i was getting an error object not found or is marked for delete.</p>
<p>ArrayDescriptor descp= ArrayDescriptor.createDescriptor(&#8221;schemaname.EMP_TYP_TABLE&#8221;,dconn).</p>
<p>       oci:217300  object schemaname.EMP_TYP_TABLE is not found  or is marked for delete.can u plz help me with this !</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to generate multiple rows from a single row based on a date range by Laurent Schneider</title>
		<link>http://oraqa.com/2007/03/01/how-to-generate-multiple-rows-from-a-single-row-based-on-a-date-range/#comment-234</link>
		<dc:creator>Laurent Schneider</dc:creator>
		<pubDate>Thu, 06 Mar 2008 07:32:04 +0000</pubDate>
		<guid isPermaLink="false">http://oraqa.com/2007/03/01/how-to-generate-multiple-rows-from-a-single-row-based-on-a-date-range/#comment-234</guid>
		<description>about the ORA-1436 please monitor enhancement request 6801807 on metalink</description>
		<content:encoded><![CDATA[<p>about the ORA-1436 please monitor enhancement request 6801807 on metalink</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Database Design Question by apc</title>
		<link>http://oraqa.com/2008/02/04/database-design/#comment-233</link>
		<dc:creator>apc</dc:creator>
		<pubDate>Tue, 05 Feb 2008 09:22:53 +0000</pubDate>
		<guid isPermaLink="false">http://oraqa.com/2008/02/04/database-design/#comment-233</guid>
		<description>If you have an Enterprise Edition licence Oracle 8.1.7.4 or higher then the one and only correct answer is Virtual Private Database AKA &lt;a href="http://download.oracle.com/docs/cd/B10501_01/network.920/a96582/protdata.htm#1007734" rel="nofollow"&gt;row level security&lt;/a&gt;.

Your other alternatives are views and/or programmatic interfaces built out of PL/SQL.

Cheers, APC</description>
		<content:encoded><![CDATA[<p>If you have an Enterprise Edition licence Oracle 8.1.7.4 or higher then the one and only correct answer is Virtual Private Database AKA <a href="http://download.oracle.com/docs/cd/B10501_01/network.920/a96582/protdata.htm#1007734" rel="nofollow">row level security</a>.</p>
<p>Your other alternatives are views and/or programmatic interfaces built out of PL/SQL.</p>
<p>Cheers, APC</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to solve the Coin Combinations Puzzle in SQL by Frank Zhou</title>
		<link>http://oraqa.com/2008/02/01/how-to-solve-the-coin-combinations-puzzle-in-sql/#comment-232</link>
		<dc:creator>Frank Zhou</dc:creator>
		<pubDate>Mon, 04 Feb 2008 19:25:45 +0000</pubDate>
		<guid isPermaLink="false">http://oraqa.com/2008/02/01/how-to-solve-the-coin-combinations-puzzle-in-sql/#comment-232</guid>
		<description>Nsp,
There is really nothing special about my thought process.
Everybody can becomes a good problem solver, if they are really enjoy doing it. Most of the time I  have solved the problem using the following approach.

1) Learn and understand every new SQL features/functions in the manual    
2) Thinking outside of the box and attack the problem from different directions.
     Don't limit your mind set to the conventional approach.
3) Draw diagrams if needed.
4) Implement the solution in layers,
  Write the inline view on top of each other as if you are implementing a function.

Frank</description>
		<content:encoded><![CDATA[<p>Nsp,<br />
There is really nothing special about my thought process.<br />
Everybody can becomes a good problem solver, if they are really enjoy doing it. Most of the time I  have solved the problem using the following approach.</p>
<p>1) Learn and understand every new SQL features/functions in the manual<br />
2) Thinking outside of the box and attack the problem from different directions.<br />
     Don&#8217;t limit your mind set to the conventional approach.<br />
3) Draw diagrams if needed.<br />
4) Implement the solution in layers,<br />
  Write the inline view on top of each other as if you are implementing a function.</p>
<p>Frank</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to solve the Coin Combinations Puzzle in SQL by nsp</title>
		<link>http://oraqa.com/2008/02/01/how-to-solve-the-coin-combinations-puzzle-in-sql/#comment-231</link>
		<dc:creator>nsp</dc:creator>
		<pubDate>Mon, 04 Feb 2008 12:18:18 +0000</pubDate>
		<guid isPermaLink="false">http://oraqa.com/2008/02/01/how-to-solve-the-coin-combinations-puzzle-in-sql/#comment-231</guid>
		<description>Frank,
Seriuosly, tell me how do you think of these solutions.
I would die to learn your thought process.
Believe me, it would take (at least) a week for me to figure out how you managed to build this query (and many others).</description>
		<content:encoded><![CDATA[<p>Frank,<br />
Seriuosly, tell me how do you think of these solutions.<br />
I would die to learn your thought process.<br />
Believe me, it would take (at least) a week for me to figure out how you managed to build this query (and many others).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Question: how to generate a range between numbers? by mjb</title>
		<link>http://oraqa.com/2008/01/23/how-to-generate-range-between-numbers/#comment-230</link>
		<dc:creator>mjb</dc:creator>
		<pubDate>Thu, 24 Jan 2008 14:47:52 +0000</pubDate>
		<guid isPermaLink="false">http://oraqa.com/2008/01/23/how-to-generate-range-between-numbers/#comment-230</guid>
		<description>Ok, so I have a table that looks like this:
&lt;pre&gt;
SQL&#62; desc testit
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 OPERATOR_NAME                                      VARCHAR2(10)
 NUMBERS                                            VARCHAR2(50)
 LOC                                                VARCHAR2(10)

&lt;/pre&gt;
And, my input dataset looks like this:
&lt;pre&gt;
SQL&#62; select * from testit;

OPERATOR_N NUMBERS                                            LOC
---------- -------------------------------------------------- ----------
sony       9848930997-9848931000                              pune
o2         65432-65435                                        hyd
voda       369852-369855                                      mum
orange     9290988345-9290988345                              blore
&lt;/pre&gt;

One solution, though I'm not convinced it's optimal, is this:
&lt;pre&gt;
SQL&#62; l
  1  with source_data as
  2  (select operator_name,
  3          substr(numbers,1,instr(numbers,'-')-1) start_num,
  4          substr(numbers,instr(numbers,'-')+1) end_num,
  5          loc
  6     from testit)
  7  select distinct operator_name,
  8                  start_num+level-1 numbers,
  9                  loc
 10    from dual,
 11         source_data
 12   connect by level &#60;=end_num-start_num+1
 13* order by 1,2,3
SQL&#62; /

OPERATOR_N    NUMBERS LOC
---------- ---------- ----------
o2              65432 hyd
o2              65433 hyd
o2              65434 hyd
o2              65435 hyd
orange     9290988345 blore
sony       9848930997 pune
sony       9848930998 pune
sony       9848930999 pune
sony       9848931000 pune
voda           369852 mum
voda           369853 mum
voda           369854 mum
voda           369855 mum

13 rows selected.

&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Ok, so I have a table that looks like this:</p>
<pre>
SQL&gt; desc testit
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 OPERATOR_NAME                                      VARCHAR2(10)
 NUMBERS                                            VARCHAR2(50)
 LOC                                                VARCHAR2(10)
</pre>
<p>And, my input dataset looks like this:</p>
<pre>
SQL&gt; select * from testit;

OPERATOR_N NUMBERS                                            LOC
---------- -------------------------------------------------- ----------
sony       9848930997-9848931000                              pune
o2         65432-65435                                        hyd
voda       369852-369855                                      mum
orange     9290988345-9290988345                              blore
</pre>
<p>One solution, though I&#8217;m not convinced it&#8217;s optimal, is this:</p>
<pre>
SQL&gt; l
  1  with source_data as
  2  (select operator_name,
  3          substr(numbers,1,instr(numbers,'-')-1) start_num,
  4          substr(numbers,instr(numbers,'-')+1) end_num,
  5          loc
  6     from testit)
  7  select distinct operator_name,
  8                  start_num+level-1 numbers,
  9                  loc
 10    from dual,
 11         source_data
 12   connect by level &lt;=end_num-start_num+1
 13* order by 1,2,3
SQL&gt; /

OPERATOR_N    NUMBERS LOC
---------- ---------- ----------
o2              65432 hyd
o2              65433 hyd
o2              65434 hyd
o2              65435 hyd
orange     9290988345 blore
sony       9848930997 pune
sony       9848930998 pune
sony       9848930999 pune
sony       9848931000 pune
voda           369852 mum
voda           369853 mum
voda           369854 mum
voda           369855 mum

13 rows selected.
</pre>
]]></content:encoded>
	</item>
</channel>
</rss>
