<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: 选择了错误的实现方法, 其实很简单!</title>
	<atom:link href="http://www.anysql.net/dba/choose_wrong_function.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.anysql.net/dba/choose_wrong_function.html</link>
	<description>SQLULDR2, DataCopy, DataSync, WebChart, OraMon, AUL/MyDUL, 性能优化及容量分析</description>
	<lastBuildDate>Tue, 20 Jul 2010 06:23:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: anysql</title>
		<link>http://www.anysql.net/dba/choose_wrong_function.html/comment-page-1#comment-865</link>
		<dc:creator>anysql</dc:creator>
		<pubDate>Fri, 06 Mar 2009 18:07:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.anysql.net/wordpress/uncategorized/%e9%80%89%e6%8b%a9%e4%ba%86%e9%94%99%e8%af%af%e7%9a%84%e5%ae%9e%e7%8e%b0%e6%96%b9%e6%b3%95-%e5%85%b6%e5%ae%9e%e5%be%88%e7%ae%80%e5%8d%95.html#comment-865</guid>
		<description>这个要根据公司的表命名规范来看.
当时我们相同表结构的表就是有相同的名字,只是序号不同.
</description>
		<content:encoded><![CDATA[<p>这个要根据公司的表命名规范来看.<br />
当时我们相同表结构的表就是有相同的名字,只是序号不同.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aigo_h</title>
		<link>http://www.anysql.net/dba/choose_wrong_function.html/comment-page-1#comment-864</link>
		<dc:creator>aigo_h</dc:creator>
		<pubDate>Fri, 06 Mar 2009 17:58:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.anysql.net/wordpress/uncategorized/%e9%80%89%e6%8b%a9%e4%ba%86%e9%94%99%e8%af%af%e7%9a%84%e5%ae%9e%e7%8e%b0%e6%96%b9%e6%b3%95-%e5%85%b6%e5%ae%9e%e5%be%88%e7%ae%80%e5%8d%95.html#comment-864</guid>
		<description>这个sql能找出表结构相同的表吗？
“这个SQL是用来找出一些表结构应当相同的表”
对照做了一下，不能啊
</description>
		<content:encoded><![CDATA[<p>这个sql能找出表结构相同的表吗？<br />
“这个SQL是用来找出一些表结构应当相同的表”<br />
对照做了一下，不能啊</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 木匠</title>
		<link>http://www.anysql.net/dba/choose_wrong_function.html/comment-page-1#comment-863</link>
		<dc:creator>木匠</dc:creator>
		<pubDate>Fri, 11 May 2007 10:24:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.anysql.net/wordpress/uncategorized/%e9%80%89%e6%8b%a9%e4%ba%86%e9%94%99%e8%af%af%e7%9a%84%e5%ae%9e%e7%8e%b0%e6%96%b9%e6%b3%95-%e5%85%b6%e5%ae%9e%e5%be%88%e7%ae%80%e5%8d%95.html#comment-863</guid>
		<description>运行结果:
TABLE_NAME	TAB_CNT	TRAN_TAB
-- -- ---
LOGMNR_HEADER2$	2	LOGMNR_HEADER#$
LOGMNR_HEADER1$	2	LOGMNR_HEADER#$
PARTS2	2	PARTS#
PARTS1	2	PARTS#
T101	4	T#
T2	4	T#
T1	4	T#
T3	4	T#
</description>
		<content:encoded><![CDATA[<p>运行结果:<br />
TABLE_NAME	TAB_CNT	TRAN_TAB<br />
&#8211; &#8212; &#8212;<br />
LOGMNR_HEADER2$	2	LOGMNR_HEADER#$<br />
LOGMNR_HEADER1$	2	LOGMNR_HEADER#$<br />
PARTS2	2	PARTS#<br />
PARTS1	2	PARTS#<br />
T101	4	T#<br />
T2	4	T#<br />
T1	4	T#<br />
T3	4	T#</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 木匠</title>
		<link>http://www.anysql.net/dba/choose_wrong_function.html/comment-page-1#comment-862</link>
		<dc:creator>木匠</dc:creator>
		<pubDate>Fri, 11 May 2007 10:17:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.anysql.net/wordpress/uncategorized/%e9%80%89%e6%8b%a9%e4%ba%86%e9%94%99%e8%af%af%e7%9a%84%e5%ae%9e%e7%8e%b0%e6%96%b9%e6%b3%95-%e5%85%b6%e5%ae%9e%e5%be%88%e7%ae%80%e5%8d%95.html#comment-862</guid>
		<description>REGEXP_REPLACE(TABLE_NAME, &#039;[1-9]&#039;, &#039;#&#039; )
更改成,
REGEXP_REPLACE(TABLE_NAME, &#039;[1-9]+&#039;, &#039;#&#039; )
替换1到任意多个数字.
</description>
		<content:encoded><![CDATA[<p>REGEXP_REPLACE(TABLE_NAME, &#8216;[1-9]&#8216;, &#8216;#&#8217; )<br />
更改成,<br />
REGEXP_REPLACE(TABLE_NAME, &#8216;[1-9]+&#8217;, &#8216;#&#8217; )<br />
替换1到任意多个数字.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 木匠</title>
		<link>http://www.anysql.net/dba/choose_wrong_function.html/comment-page-1#comment-861</link>
		<dc:creator>木匠</dc:creator>
		<pubDate>Fri, 11 May 2007 10:15:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.anysql.net/wordpress/uncategorized/%e9%80%89%e6%8b%a9%e4%ba%86%e9%94%99%e8%af%af%e7%9a%84%e5%ae%9e%e7%8e%b0%e6%96%b9%e6%b3%95-%e5%85%b6%e5%ae%9e%e5%be%88%e7%ae%80%e5%8d%95.html#comment-861</guid>
		<description>改进型:
SELECT * FROM(
SELECT TABLE_NAME, count(*) over (PARTITION BY REGEXP_REPLACE(TABLE_NAME, &#039;[0-9]+&#039;, &#039;#&#039; ) ) AS tab_cnt
, REGEXP_REPLACE(TABLE_NAME, &#039;[0-9]+&#039;, &#039;#&#039; ) tran_tab
FROM USER_TABLES
) WHERE tab_cnt &gt; 1
优点:
1) 两位数,3位数,n位数 都可以.
2) Count(*) over (PARTITION BY)
更容易理解, RATIO_TO_REPORT 分析函数有的用过了.
我最近正在学习 SQL Analytic Functions, 感谢 rollingpig 给出RATIO_TO_REPORT的这个用法.
</description>
		<content:encoded><![CDATA[<p>改进型:<br />
SELECT * FROM(<br />
SELECT TABLE_NAME, count(*) over (PARTITION BY REGEXP_REPLACE(TABLE_NAME, &#8216;[0-9]+&#8217;, &#8216;#&#8217; ) ) AS tab_cnt<br />
, REGEXP_REPLACE(TABLE_NAME, &#8216;[0-9]+&#8217;, &#8216;#&#8217; ) tran_tab<br />
FROM USER_TABLES<br />
) WHERE tab_cnt > 1<br />
优点:<br />
1) 两位数,3位数,n位数 都可以.<br />
2) Count(*) over (PARTITION BY)<br />
更容易理解, RATIO_TO_REPORT 分析函数有的用过了.<br />
我最近正在学习 SQL Analytic Functions, 感谢 rollingpig 给出RATIO_TO_REPORT的这个用法.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rollingpig</title>
		<link>http://www.anysql.net/dba/choose_wrong_function.html/comment-page-1#comment-860</link>
		<dc:creator>rollingpig</dc:creator>
		<pubDate>Wed, 09 May 2007 19:16:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.anysql.net/wordpress/uncategorized/%e9%80%89%e6%8b%a9%e4%ba%86%e9%94%99%e8%af%af%e7%9a%84%e5%ae%9e%e7%8e%b0%e6%96%b9%e6%b3%95-%e5%85%b6%e5%ae%9e%e5%be%88%e7%ae%80%e5%8d%95.html#comment-860</guid>
		<description>提供一个只需要访问一次use_tables的方法
SELECT table_name FROM(
SELECT TABLE_NAME,RATIO_TO_REPORT (1) over(PARTITION BY TRANSLATE(TABLE_NAME,&#039;0123456789&#039;,&#039;##########&#039;)   ) AS r
FROM USER_TABLES
) WHERE r &lt; 1
</description>
		<content:encoded><![CDATA[<p>提供一个只需要访问一次use_tables的方法<br />
SELECT table_name FROM(<br />
SELECT TABLE_NAME,RATIO_TO_REPORT (1) over(PARTITION BY TRANSLATE(TABLE_NAME,&#8217;0123456789&#8242;,&#8217;##########&#8217;)   ) AS r<br />
FROM USER_TABLES<br />
) WHERE r &lt; 1</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anysql</title>
		<link>http://www.anysql.net/dba/choose_wrong_function.html/comment-page-1#comment-859</link>
		<dc:creator>anysql</dc:creator>
		<pubDate>Wed, 25 Apr 2007 15:42:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.anysql.net/wordpress/uncategorized/%e9%80%89%e6%8b%a9%e4%ba%86%e9%94%99%e8%af%af%e7%9a%84%e5%ae%9e%e7%8e%b0%e6%96%b9%e6%b3%95-%e5%85%b6%e5%ae%9e%e5%be%88%e7%ae%80%e5%8d%95.html#comment-859</guid>
		<description>还没有全部到10g啊, 学了Perl后, 正则表达式是第一个想到的.
</description>
		<content:encoded><![CDATA[<p>还没有全部到10g啊, 学了Perl后, 正则表达式是第一个想到的.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 木匠</title>
		<link>http://www.anysql.net/dba/choose_wrong_function.html/comment-page-1#comment-858</link>
		<dc:creator>木匠</dc:creator>
		<pubDate>Wed, 25 Apr 2007 13:24:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.anysql.net/wordpress/uncategorized/%e9%80%89%e6%8b%a9%e4%ba%86%e9%94%99%e8%af%af%e7%9a%84%e5%ae%9e%e7%8e%b0%e6%96%b9%e6%b3%95-%e5%85%b6%e5%ae%9e%e5%be%88%e7%ae%80%e5%8d%95.html#comment-858</guid>
		<description>还有更简洁的, 运用正则表达式 替换 或者 查找:
select REGEXP_REPLACE(TABLE_NAME, &#039;[1-9]&#039;, &#039;#&#039; )
from cat;
</description>
		<content:encoded><![CDATA[<p>还有更简洁的, 运用正则表达式 替换 或者 查找:<br />
select REGEXP_REPLACE(TABLE_NAME, &#8216;[1-9]&#8216;, &#8216;#&#8217; )<br />
from cat;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
