<?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-7545721543212935140</id><updated>2011-11-27T20:38:19.878-05:00</updated><category term='Verify'/><category term='Performance'/><category term='WHEN'/><category term='Positional Parameters'/><category term='Q-Quote'/><category term='Exists'/><category term='Rollup'/><category term='Execute Immediate'/><category term='Feedback'/><category term='SCN'/><category term='Clob'/><category term='ANSI'/><category term='RegExp_Substr'/><category term='Ttitle'/><category term='Backup'/><category term='Hex'/><category term='11g'/><category term='Heading'/><category term='Active Sessions'/><category term='Start'/><category term='Refcursor'/><category term='Profile'/><category term='Case'/><category term='Self-Join'/><category term='Documentation'/><category term='Prompt'/><category term='Insert'/><category term='Kill session'/><category term='DCBA'/><category term='Truncate'/><category term='Cube'/><category term='Lpad'/><category term='Title'/><category term='To_Lob'/><category term='Instr'/><category term='Loop'/><category term='CTXCat'/><category term='Disable'/><category term='Linebreak'/><category term='Mailing Labels'/><category term='From'/><category term='Soundex'/><category term='Word'/><category term='Flashback'/><category term='Fuzzy'/><category term='Connect by'/><category term='Accept'/><category term='Synonym'/><category term='Privileges'/><category term='Grouping Sets'/><category term='Slow'/><category term='Layout'/><category term='Where'/><category term='Rowid'/><category term='Called'/><category term='Sessions'/><category term='Alpha'/><category term='Dense_Rank'/><category term='NVL'/><category term='Recycle Bin'/><category term='Sequence'/><category term='Virtual Private Database'/><category term='Segment'/><category term='Logfile'/><category term='Blog'/><category term='Minus'/><category term='On Report'/><category term='Bind'/><category term='Excel'/><category term='VPD'/><category term='DBF'/><category term='Max'/><category term='Control'/><category term='Mod'/><category term='Oracle'/><category term='Compute'/><category term='System Change Number'/><category term='Punctuation'/><category term='Partition By'/><category term='Context'/><category term='Break'/><category term='Version'/><category term='Drop'/><category term='Count Rows'/><category term='CurrVal'/><category term='Equi-Join'/><category term='Index'/><category term='Variables'/><category term='Parameter'/><category term='Escape'/><category term='Dump'/><category term='Grant'/><category term='Storage'/><category term='Timestamp'/><category term='Cluster'/><category term='Size'/><category term='Inline View'/><category term='Rank'/><category term='NoPrint'/><category term='Object'/><category term='Merge'/><category term='Bottom-n'/><category term='_User'/><category term='Lag'/><category term='Create'/><category term='ASCII'/><category term='Simple_Integer'/><category term='Datafile'/><category term='Sys_Context'/><category term='CSV'/><category term='Schemas'/><category term='Null'/><category term='Dates'/><category term='SQL*Plus'/><category term='Functions'/><category term='Start With'/><category term='Set'/><category term='Hierarchy'/><category term='/*+'/><category term='Sum'/><category term='Database'/><category term='Unique'/><category term='Leading Zeros'/><category term='Trunc'/><category term='Stop'/><category term='Top-n'/><category term='Level'/><category term='To_Date'/><category term='DOS'/><category term='SQL*Loader'/><category term='Store'/><category term='Pivot'/><category term='Join'/><category term='SQL'/><category term='Extent'/><category term='UserEnv'/><category term='Connection'/><category term='Distinct Count'/><category term='Term'/><category term='PL/SQL'/><category term='Constraints'/><category term='Linking Tables'/><category term='Reverse Engineer'/><category term='In'/><category term='Session_User'/><category term='Procedures'/><category term='Sysdate'/><category term='Delete'/><category term='Pls_Integer'/><category term='Length'/><category term='NullIf'/><category term='Quote'/><category term='Text'/><category term='Inner Join'/><category term='Named Parameters'/><category term='Trim'/><category term='Dbms_Session.Set_Context'/><category term='Comment'/><category term='Percentage'/><category term='DCL'/><category term='HR'/><category term='Series'/><category term='SGA'/><category term='Elapsed'/><category term='Multitable Insert'/><category term='Enterprise Manager'/><category term='Gb'/><category term='Login.sql'/><category term='Rownum'/><category term='Class'/><category term='Fast'/><category term='Modify'/><category term='Underscores'/><category term='System Privileges'/><category term='Order by'/><category term='Hints'/><category term='Decode'/><category term='Column_name'/><category term='Physical'/><category term='Gigabyte'/><category term='Rename'/><category term='Enable'/><category term='Attribute'/><category term='Virtual Table'/><category term='Conditional Spool'/><category term='Data Block'/><category term='User_Tab_Columns'/><category term='Rollback'/><category term='Column_names'/><category term='DML'/><category term='ORA-'/><category term='View'/><category term='RegExp_Instr'/><category term='Tablespace'/><category term='Count'/><category term='External Tables'/><category term='Spool'/><category term='Table'/><category term='Chr(10)'/><category term='SQL Developer'/><category term='HTML'/><category term='Union'/><category term='Process'/><category term='Debug'/><category term='With'/><category term='Alter'/><category term='Exceptions'/><category term='TCL'/><category term='Column'/><category term='Cartesian Merge'/><category term='Entmap'/><category term='By'/><category term='All_Catalog'/><category term='RepHeader'/><category term='Controlfile'/><category term='Template'/><category term='Define'/><category term='XP'/><category term='Trigger'/><category term='Calendar'/><category term='Single Quotes'/><category term='Data Dictionary'/><category term='Logical'/><category term='Conditional Prompt'/><category term='RegExp_Count'/><category term='Thanks'/><category term='9i'/><category term='Row_Number()'/><category term='Colsep'/><category term='User'/><category term='Correlated Subquery'/><category term='Cross Join'/><category term='Labels'/><category term='Data Pump'/><category term='Substr'/><category term='Modeler'/><category term='Entity'/><category term='Global Temporary Table'/><category term='Outer Join'/><category term='Alter Session'/><category term='New_Value'/><category term='Flat File'/><category term='Amper-Variables'/><category term='Duplicates'/><category term='Translate'/><category term='Lead'/><category term='Sample'/><category term='Instance'/><category term='Menu'/><category term='iSql+'/><category term='Revoke'/><category term='Group By'/><category term='Partition'/><category term='Order Siblings by'/><category term='Conditional Call'/><category term='Role'/><category term='Discrepancies'/><category term='Java'/><category term='Phone'/><category term='DDL'/><category term='Create Table'/><category term='RegExp'/><category term='Table_Name'/><category term='Long'/><category term='Dbms_Rls'/><category term='Cartesian Join'/><category term='Reserved Words'/><category term='NextVal'/><category term='Subquery'/><category term='Locks'/><category term='Update'/><category term='To_Char'/><category term='Leap Year'/><category term='Time'/><category term='Round'/><category term='Scott'/><category term='Character'/><category term='Check Constraint'/><category term='Object Oriented'/><category term='Generating Code'/><category term='Logical vs. Physical'/><title type='text'>My Oracle 10g Tips</title><subtitle type='html'>&lt;center&gt;Bits &amp;amp; pieces of code I&amp;#39;ve written -- plus a few I&amp;#39;ve been given -- kept in one place so I can find the logic&lt;br&gt;that I know I already have.&lt;/center&gt;</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default?start-index=101&amp;max-results=100'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>191</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-2601575802709662401</id><published>2011-08-14T11:24:00.000-04:00</published><updated>2011-08-14T11:24:28.275-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Developer'/><category scheme='http://www.blogger.com/atom/ns#' term='Connection'/><title type='text'>Connecting to SQL Developer</title><summary type='text'>A while ago, the disk on my laptop crashed, and so now I'm trying to download and set up some of the tools I used before. I got SQL Developer installed, but naturally couldn't remember what I did to get the connection.  This time I decided to put it in writing.  I honestly haven't done any studying of Oracle's material on installation so it probably is all there, but one of the main reasons I </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/2601575802709662401/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2011/08/connecting-to-sql-developer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/2601575802709662401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/2601575802709662401'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2011/08/connecting-to-sql-developer.html' title='Connecting to SQL Developer'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-fOkZymm3SGM/TkflQUnOusI/AAAAAAAAzbU/v_HJWeQdJ50/s72-c/sqldevconnect.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-722340086185362617</id><published>2011-08-11T12:25:00.001-04:00</published><updated>2011-08-12T08:56:08.800-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='To_Char'/><category scheme='http://www.blogger.com/atom/ns#' term='Dates'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Wanna' Date?</title><summary type='text'>
Just a picture of 99% of the date variations listed in the book, although I'm saving timestamps for another post. 
The Easy Way Select To_Char(Sysdate,'DL'   ) DL   /* long date */      , To_Char(Sysdate,'DS'   ) DS   /* short date */      , To_Char(Sysdate,'TS'   ) TS   /* short time */      , To_Char(Sysdate,'DS TS') DSTS /* short date, time */  From Dual;
DL                        | DS       </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/722340086185362617/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2011/08/wanna-date.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/722340086185362617'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/722340086185362617'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2011/08/wanna-date.html' title='Wanna&apos; Date?'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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-7545721543212935140.post-2047833675076182164</id><published>2011-07-24T22:12:00.001-04:00</published><updated>2011-08-09T22:34:14.943-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Self-Join'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>My Ah-ha! Moment with Self-Joins</title><summary type='text'>I was recently taking an online class in SQL from Oracle. I will admit that sometimes self-joins still baffle my mind. So I decided to try what they said.

Oracle's statement was:
"To join a table to itself, the table is given two names or aliases. This will make the database “think” that there are two tables. Choose alias names that relate to the data's association with that table."
So I decided</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/2047833675076182164/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2011/07/my-ah-ha-moment-with-self-joins.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/2047833675076182164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/2047833675076182164'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2011/07/my-ah-ha-moment-with-self-joins.html' title='My Ah-ha! Moment with Self-Joins'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-q3Ic95MqpOw/TizPJ2izQpI/AAAAAAAAy6I/pHFr_vEyjkc/s72-c/self-join.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-6599303899361245201</id><published>2011-07-23T10:07:00.000-04:00</published><updated>2011-07-23T10:07:59.426-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Order Siblings by'/><category scheme='http://www.blogger.com/atom/ns#' term='Start With'/><category scheme='http://www.blogger.com/atom/ns#' term='Hierarchy'/><category scheme='http://www.blogger.com/atom/ns#' term='Level'/><category scheme='http://www.blogger.com/atom/ns#' term='Connect by'/><title type='text'>HR Hierarchy</title><summary type='text'>A friend asked me to explain the hierarchical query, and when I went back to look at what I had on the blog, there was little explanation, and more of just a sample for me to follow next time I had to write one.  So I decided to redo it in the HR schema and add a few comments.  All the special words used for hierarchical queries are shown in red.

Line 3, 7, 8, 9 have to do with padding the name </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/6599303899361245201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2011/07/hr-hierarchy.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/6599303899361245201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/6599303899361245201'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2011/07/hr-hierarchy.html' title='HR Hierarchy'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-cRI9-qGAzbs/TirQrgyvnbI/AAAAAAAAy58/uIFS5hIH9v4/s72-c/hr-hierarchy.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-8470159535400595792</id><published>2011-07-22T09:10:00.002-04:00</published><updated>2011-08-09T22:31:10.734-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL*Plus'/><title type='text'>SQL*Plus Output -&gt;  HTML</title><summary type='text'>*I saw this on Uwe Hesse's blog, and it was too cool not to keep a copy where I knew I could find it again.  The only thing I added to his script was the 'Start' in front of 'Firefox' that's needed by Windows (and the comment about removing the 'l').

HTML.SQL:
set termout off

set markup HTML ON HEAD " -
 -
" -
BODY " " -
TABLE "border='1' align='center' summary='Script output'" -
SPOOL ON </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/8470159535400595792/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2011/07/sqlplus-output-html.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/8470159535400595792'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/8470159535400595792'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2011/07/sqlplus-output-html.html' title='SQL*Plus Output -&gt;  HTML'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-V2UYY92tk7I/TilODf260fI/AAAAAAAAy5k/gu58EAtWVeI/s72-c/html-before.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-6387023514120367300</id><published>2011-07-13T10:35:00.001-04:00</published><updated>2011-07-13T10:37:33.654-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cross Join'/><category scheme='http://www.blogger.com/atom/ns#' term='Inner Join'/><category scheme='http://www.blogger.com/atom/ns#' term='Join'/><category scheme='http://www.blogger.com/atom/ns#' term='Outer Join'/><category scheme='http://www.blogger.com/atom/ns#' term='Cartesian Join'/><category scheme='http://www.blogger.com/atom/ns#' term='Equi-Join'/><category scheme='http://www.blogger.com/atom/ns#' term='ANSI'/><title type='text'>Oracle Proprietary vs. ANSI-99 Joins</title><summary type='text'>
 Oracle Proprietary JoinsANSI-99 SQL Joins
To display only rows with matching Keys
"Equi-Join" aka "Simple Join" aka "Inner Join"
The WHERE clause states how to join the tables
Use AND to specify other conditions   (i.e., AND City = 'DC')
Select L.Key, NameL, NameR     
  From TableL L
     , TableR R
 WHERE L.Key = R.Key;“Natural Join”
Can't use aliases1) Key Name and Type are the same
Select </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/6387023514120367300/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2011/07/oracle-proprietary-vs-ansi-99-joins.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/6387023514120367300'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/6387023514120367300'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2011/07/oracle-proprietary-vs-ansi-99-joins.html' title='Oracle Proprietary vs. ANSI-99 Joins'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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-7545721543212935140.post-1624191715688369020</id><published>2011-07-11T15:16:00.000-04:00</published><updated>2011-07-11T15:16:00.905-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WHEN'/><category scheme='http://www.blogger.com/atom/ns#' term='Multitable Insert'/><title type='text'>Multi-Table Inserts -- Just the Basics</title><summary type='text'>You can use a multi-table insert when data from one table can be used to populate several tables. This is something often seen in a data warehouse.

They can be unconditional or conditional, but not both.  To do both, you can 'fake' it out by adding 'When 1=1 Then' to unconditional inserts.

If you want to see this work, you can copy the code shown below. It will run in the Scott schema.

</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/1624191715688369020/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2011/07/multi-table-inserts-just-basics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/1624191715688369020'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/1624191715688369020'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2011/07/multi-table-inserts-just-basics.html' title='Multi-Table Inserts -- Just the Basics'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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-7545721543212935140.post-8333802765062361579</id><published>2011-07-10T19:20:00.000-04:00</published><updated>2011-07-10T19:20:29.542-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Grouping Sets'/><category scheme='http://www.blogger.com/atom/ns#' term='Rollup'/><category scheme='http://www.blogger.com/atom/ns#' term='Decode'/><category scheme='http://www.blogger.com/atom/ns#' term='Cube'/><category scheme='http://www.blogger.com/atom/ns#' term='Case'/><title type='text'>To Sum It Up...</title><summary type='text'>ROLLUP, CUBE, GROUPING SETS and GROUPING can be used to subtotal and total aggregates based on the values in the GROUP BY clause.

ROLLUP generates subtotals and totals (for example, salary by departments, and the total salary for the report).  If there is more than one field listed in the GROUP BY ROLLUP clause, the subtotals move from right to left.

This shows the basic 'GROUP BY' which will </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/8333802765062361579/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2011/07/to-sum-it-up.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/8333802765062361579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/8333802765062361579'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2011/07/to-sum-it-up.html' title='To Sum It Up...'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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-7545721543212935140.post-6830122109477263165</id><published>2011-04-18T16:22:00.000-04:00</published><updated>2011-04-18T16:22:46.960-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dense_Rank'/><category scheme='http://www.blogger.com/atom/ns#' term='Bottom-n'/><category scheme='http://www.blogger.com/atom/ns#' term='Rank'/><category scheme='http://www.blogger.com/atom/ns#' term='Top-n'/><title type='text'>RANK vs DENSE_RANK</title><summary type='text'>If you're not familiar with how RANK works, you may want to check out my previous post by clicking here.

This post shows the difference between RANK and DENSE_RANK.Select DeptNo
     , Sal
     ,             RANK() OVER (Partition By DeptNo
                                    Order By Sal  )
       Rank
     ,       DENSE_RANK() OVER (Partition By DeptNo
                                    Order</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/6830122109477263165/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2011/04/rank-vs-denserank.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/6830122109477263165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/6830122109477263165'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2011/04/rank-vs-denserank.html' title='RANK vs DENSE_RANK'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-OKsDHAXPcyc/TaybRQXYh_I/AAAAAAAAvuc/zE_2Sa6210E/s72-c/drank1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-3061236616555334675</id><published>2011-04-17T00:41:00.000-04:00</published><updated>2011-04-17T00:41:14.946-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Bottom-n'/><category scheme='http://www.blogger.com/atom/ns#' term='Rank'/><category scheme='http://www.blogger.com/atom/ns#' term='Top-n'/><category scheme='http://www.blogger.com/atom/ns#' term='Partition By'/><title type='text'>Rank and File</title><summary type='text'>Someone asked me the other day how to pull the top-n number of rows from a table.  Of course, I thought of the old way of sorting rows in a subquery and then pulling based on rownum. For example, if you want to show records for the top three salaries, you could code: 
Select *
  From ( Select *
           From Emp
          Order By Sal Desc )
  Where RowNum &lt; 4;RANK is a better option -- and it </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/3061236616555334675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2011/04/rank-and-file_17.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/3061236616555334675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/3061236616555334675'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2011/04/rank-and-file_17.html' title='Rank and File'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-fPUpBlu1sUw/TapZ6yYgTAI/AAAAAAAAvt4/IZf5nCrH3rc/s72-c/rank1.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-1984750732812837740</id><published>2011-02-14T13:48:00.000-05:00</published><updated>2011-02-14T13:48:14.118-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Flashback'/><category scheme='http://www.blogger.com/atom/ns#' term='Trigger'/><category scheme='http://www.blogger.com/atom/ns#' term='Table'/><category scheme='http://www.blogger.com/atom/ns#' term='Recycle Bin'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Index'/><title type='text'>Flashback a Table, Index and Trigger Script</title><summary type='text'>This script performs a flashback of tables, indexes and triggers. If the item already exists, it will be renamed with the base_object number.


1) After displaying a list of tables that are in the Recycle Bin, the script will ask for a table to be flashbacked.

2) If a table with that name already exists, a message is displayed stating that the base number will be added to the name.

3) A report </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/1984750732812837740/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2011/02/flashback-table-index-and-trigger.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/1984750732812837740'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/1984750732812837740'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2011/02/flashback-table-index-and-trigger.html' title='Flashback a Table, Index and Trigger Script'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_nnCCr2HgeBs/SKY0ybyAttI/AAAAAAAAVN0/wrEVj_GLZLo/s72-c/flashtbl.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-5940858740057024828</id><published>2010-10-22T15:20:00.000-04:00</published><updated>2010-10-22T15:20:28.710-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Column_names'/><category scheme='http://www.blogger.com/atom/ns#' term='Called'/><category scheme='http://www.blogger.com/atom/ns#' term='Table_Name'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Documentation'/><category scheme='http://www.blogger.com/atom/ns#' term='Amper-Variables'/><title type='text'>Documenting SQL Queries</title><summary type='text'>(This is an update to a previously posted query.)  This code will help document a SQL query as it looks through that code to find the list of tables, columns, amper-variables, and other called queries referenced.  I added the following to the older version: called queries, a reference to the query name in the spooled file, and also to the spool filename.

There are some limitations in this code:
</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/5940858740057024828/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2010/10/documenting-sql-queries.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/5940858740057024828'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/5940858740057024828'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2010/10/documenting-sql-queries.html' title='Documenting SQL Queries'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_nnCCr2HgeBs/SzFjlSstDwI/AAAAAAAAqUk/tLubT7BgAww/s72-c/namesincode1.jpg' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-8267296209129230608</id><published>2010-10-16T10:56:00.000-04:00</published><updated>2010-10-16T10:56:16.250-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CSV'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='Generating Code'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Generate Code to Create a CSV File</title><summary type='text'>I was continually reworking the code to create CSV files for a particular application, so I wrote a query to do it for me.  (It is long enough that I stored it as an attachment on the following page  Cr_Csv.Sql. You'll have to scroll to the bottom to see the attachment.) 

It will read through the User_Tab_Columns table, and pull all columns (except those in tables in the recycle bin).  The data </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/8267296209129230608/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2010/10/generate-code-to-create-csv-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/8267296209129230608'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/8267296209129230608'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2010/10/generate-code-to-create-csv-file.html' title='Generate Code to Create a CSV File'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_nnCCr2HgeBs/SY6mm4pRwoI/AAAAAAAAdkE/TMN8UNd67jM/s72-c/CRCSV.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-8591594021799982047</id><published>2010-08-17T19:28:00.000-04:00</published><updated>2010-08-17T19:28:23.801-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RegExp_Count'/><category scheme='http://www.blogger.com/atom/ns#' term='RegExp_Substr'/><category scheme='http://www.blogger.com/atom/ns#' term='RegExp_Instr'/><title type='text'>11g: New Regular Expression Functions</title><summary type='text'>RegExp_Count has been added in 11g.  It's pretty straight forward. In this example, I'm looking through this popular tongue-twister for the occurrences of the letters 'pic', and not surprisingly it will tell me '2.' 
SELECT REGEXP_COUNT 
    ( 'Peter Piper picked a peck of pickled peppers' -- Searched string
    , 'pic'                                          -- Pattern to find
    , 1</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/8591594021799982047/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2010/08/11g-new-regular-expression-functions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/8591594021799982047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/8591594021799982047'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2010/08/11g-new-regular-expression-functions.html' title='11g: New Regular Expression Functions'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_nnCCr2HgeBs/TB0ebODMgOI/AAAAAAAAtbc/HgXRoPhIAco/s72-c/substr.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-1181082717845274621</id><published>2010-07-04T14:50:00.003-04:00</published><updated>2010-07-04T14:52:02.361-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Object'/><category scheme='http://www.blogger.com/atom/ns#' term='Attribute'/><category scheme='http://www.blogger.com/atom/ns#' term='Instance'/><category scheme='http://www.blogger.com/atom/ns#' term='Class'/><category scheme='http://www.blogger.com/atom/ns#' term='Entity'/><title type='text'>An Entity By Any Other Name...</title><summary type='text'>Logical/ RelationalLogical/ Object-OrientedPhysical Implementation
EntityClassTable
AttributeAttributeColumn
InstanceObjectRow
</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/1181082717845274621/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2010/07/entity-by-any-other-name.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/1181082717845274621'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/1181082717845274621'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2010/07/entity-by-any-other-name.html' title='An Entity By Any Other Name...'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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-7545721543212935140.post-15876958887149531</id><published>2010-07-03T16:26:00.002-04:00</published><updated>2010-07-04T14:52:46.029-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DCL'/><category scheme='http://www.blogger.com/atom/ns#' term='TCL'/><category scheme='http://www.blogger.com/atom/ns#' term='DDL'/><category scheme='http://www.blogger.com/atom/ns#' term='DML'/><title type='text'>SQL Statement Types</title><summary type='text'>AcronymLanguagePurposeStatementsComments
DDLData DefinitionDefine Database· Create · Alter · Drop · Truncate · Comment · Rename · DeleteAutocommit
DMLData ManipulationManaging data· Select · Insert · Update · Delete · Merge 
· Call · Explain Plan · Lock TableCan rollback
DCLData ControlSecurity· Grant · Revoke
TCLTransaction Control Manage DML· Commit · Savepoint · Rollback · Set Transaction
</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/15876958887149531/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2010/07/sql-statement-types.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/15876958887149531'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/15876958887149531'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2010/07/sql-statement-types.html' title='SQL Statement Types'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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-7545721543212935140.post-1804250447857075496</id><published>2010-06-23T18:23:00.000-04:00</published><updated>2010-06-23T18:23:40.122-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Named Parameters'/><category scheme='http://www.blogger.com/atom/ns#' term='11g'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Positional Parameters'/><title type='text'>11g: Mixed Name + Positional Notations</title><summary type='text'>Changes with 11g:
you can mix named with positional parameters in a call.  
the SQL code matches the PL/SQL code.
Notes:
Exclusionary Notation: one or more can be excluded if optional. (When formal parameters have defaults they are optional.)
You still can't call a function from SQL when any of its formal  parameters are defined as IN OUT or OUT mode–only variables. 
Mixed must list all </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/1804250447857075496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2010/06/11g-mixed-name-positional-notations.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/1804250447857075496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/1804250447857075496'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2010/06/11g-mixed-name-positional-notations.html' title='11g: Mixed Name + Positional Notations'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_nnCCr2HgeBs/TCKIbIgk-uI/AAAAAAAAtc8/-We2iRIbYv4/s72-c/mixnot.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-4102288680930789563</id><published>2010-06-19T15:09:00.000-04:00</published><updated>2010-06-19T15:09:32.503-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='11g'/><category scheme='http://www.blogger.com/atom/ns#' term='Simple_Integer'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='Pls_Integer'/><title type='text'>11g: SIMPLE_INTEGER is faster than PLS_INTEGER</title><summary type='text'>Reading the improvements on 11g, I came across these new data types. They have NOT NULL constraints and should be faster.
SIMPLE_INTEGER - based on PLS_INTEGER
SIMPLE_FLOAT  - based on BINARY_FLOAT
SIMPLE_DOUBLE - based on BINARY_DOUBLE.
With a basic time test, I did find SIMPLE_INTEGER to be faster, and I don't know where I go wrong on the others, but they're are actually running slower for me.</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/4102288680930789563/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2010/06/11g-simpleinteger-is-faster-than.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/4102288680930789563'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/4102288680930789563'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2010/06/11g-simpleinteger-is-faster-than.html' title='11g: SIMPLE_INTEGER is faster than PLS_INTEGER'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_nnCCr2HgeBs/TB0SXwRN6vI/AAAAAAAAtbU/NF-MP4K0DrE/s72-c/simple_integer.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-9119499639258739894</id><published>2010-03-10T17:56:00.009-05:00</published><updated>2010-03-19T16:52:30.538-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Q-Quote'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='Generating Code'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Writing Generated Code with Q-Quotes</title><summary type='text'>Q-quotes have just made generating code too easy. It used to take several tries for me to get it right, but no more! I'm usually generating code because I want to pull some different values from tables (i.e., table_name).Here are the steps:1) Write out a sample of the code you want generated. Obviously, you'll want to run it first to make sure you're getting the final results needed.Select 'Table</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/9119499639258739894/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2010/03/writing-generated-code-with-q-quotes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/9119499639258739894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/9119499639258739894'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2010/03/writing-generated-code-with-q-quotes.html' title='Writing Generated Code with Q-Quotes'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_nnCCr2HgeBs/S5g6AO8PNoI/AAAAAAAAsbw/novwbysRlOU/s72-c/gencode.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-6162626444891482679</id><published>2009-12-22T11:52:00.012-05:00</published><updated>2010-02-10T22:45:04.282-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Column_names'/><category scheme='http://www.blogger.com/atom/ns#' term='Called'/><category scheme='http://www.blogger.com/atom/ns#' term='Table_Name'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Documentation'/><category scheme='http://www.blogger.com/atom/ns#' term='Amper-Variables'/><title type='text'>Finding Names in SQL Queries</title><summary type='text'>(This is an update to a previously posted query.)  This code will help document a SQL query as it looks through that code to find the list of tables, columns, amper-variables, and other called queries referenced.  I added the following to the older version: called queries, a reference to the query name in the spooled file, and also to the spool filename.There are some limitations in this code:It </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/6162626444891482679/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2009/12/finding-names-in-sql-queries.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/6162626444891482679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/6162626444891482679'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2009/12/finding-names-in-sql-queries.html' title='Finding Names in SQL Queries'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_nnCCr2HgeBs/SzFjlSstDwI/AAAAAAAAqUk/tLubT7BgAww/s72-c/namesincode1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-3640030205775714570</id><published>2009-07-23T06:27:00.008-04:00</published><updated>2009-07-23T06:39:56.048-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Delete'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Delete Based on Another Table</title><summary type='text'>I recently had to delete records in one table based on the data in another table.  This isn't particularly tricky, but the only examples I could find online ended up deleting all the records in the table.The code at the beginning is just to set up a table I can use as an example.Conn Scott/TigerSet Feedback On Echo OnSelect *From Dept;Drop Table Dept2 Purge;Create Table Dept2 AsSelect * From Dept</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/3640030205775714570/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2009/07/delete-based-on-another-table.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/3640030205775714570'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/3640030205775714570'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2009/07/delete-based-on-another-table.html' title='Delete Based on Another Table'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_nnCCr2HgeBs/Smg76LxXJAI/AAAAAAAAlMY/H_y6rLfo3Oc/s72-c/dept.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-5196341202754741814</id><published>2009-07-08T17:36:00.006-04:00</published><updated>2009-07-08T19:14:27.908-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='External Tables'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Timestamp'/><title type='text'>Timestamp in an External Table</title><summary type='text'>Since this wasn't particularly easy to find, and it took several tries, I decided to post it here.  As most things, once you know how to write it, it's not particularly tricky.Input Data from External Table:1,Jan 8 1998 12:43:27:012AM2,Feb 19 1998 2:43:27:111PM3,Jan 8 2008 3:49:27:693PMCreate Table Ext_Dt(  Item       Number , Needed_By  Timestamp)Organization External( Type Oracle_Loader Default</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/5196341202754741814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2009/07/timestamp-in-external-table.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/5196341202754741814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/5196341202754741814'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2009/07/timestamp-in-external-table.html' title='Timestamp in an External Table'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_nnCCr2HgeBs/SlUWPWmIolI/AAAAAAAAkww/jkJSuzkyNn8/s72-c/timestamp.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-4867492114053407513</id><published>2009-05-20T11:40:00.003-04:00</published><updated>2009-05-20T11:46:09.261-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Logical vs. Physical'/><category scheme='http://www.blogger.com/atom/ns#' term='Database'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='Object Oriented'/><title type='text'>Database Terminology</title><summary type='text'>  Physical Logical/Relational Logical/Obj.Orient Definition Examples   Table Entity Class Something you want to store data for Department, Employees   ColumnAttributeAttributeAn item that helps describes the entityDepartment Location, Employee Birthdate   RowInstanceObjectA specific example of the entityPittsburgh department, Lynn's birthdate: 01/01/1970  </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/4867492114053407513/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2009/05/database-terminology.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/4867492114053407513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/4867492114053407513'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2009/05/database-terminology.html' title='Database Terminology'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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-7545721543212935140.post-8749125416828914091</id><published>2009-05-11T08:42:00.004-04:00</published><updated>2009-05-11T08:50:21.060-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='New_Value'/><category scheme='http://www.blogger.com/atom/ns#' term='Variables'/><category scheme='http://www.blogger.com/atom/ns#' term='From'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Selecting from a Variable TableName</title><summary type='text'>A question was posted on ITToolBox asking how to select from a table based on a column.   You can't use a CASE clause in the FROM statement, but the following -- though convoluted -- does work.'New_Value' in the 'Column' statement will create a new variable named 'Table' that can then be used in the final query.Set Verify Off Echo Off Linesize 200Accept Key Prompt 'Enter the key for the table you</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/8749125416828914091/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2009/05/selecting-from-variable-tablename.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/8749125416828914091'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/8749125416828914091'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2009/05/selecting-from-variable-tablename.html' title='Selecting from a Variable TableName'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_nnCCr2HgeBs/SggeEeF8gXI/AAAAAAAAhJQ/YOEtbVnQnuo/s72-c/from.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-2983764383666566983</id><published>2009-03-14T15:40:00.001-04:00</published><updated>2009-03-14T15:40:50.411-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Single Quotes'/><category scheme='http://www.blogger.com/atom/ns#' term='Q-Quote'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>How to Code Single Quotes with Q-Quote</title><summary type='text'>Starting in 10g, use a 'q', a pair of single quotes, and a pair of brackets to code a literal that uses a single quote.  With this method, you can code it exactly as it is.Select q'!He's ok!'        As Single_Quote_In_Middle     , q'['I like him.']'  As Single_Quote_At_Ends     , q'(')'              As Single_Quote_Alone     , q'&lt;''&gt;'             As Two_Single_Quotes  From Dual;To delete or </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/2983764383666566983/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2009/03/how-to-code-single-quotes-with-q-quote.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/2983764383666566983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/2983764383666566983'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2009/03/how-to-code-single-quotes-with-q-quote.html' title='How to Code Single Quotes with Q-Quote'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-781387412847787212</id><published>2009-03-12T09:40:00.002-04:00</published><updated>2009-03-12T09:44:38.746-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Exceptions'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Oracle Exceptions found in DBA_Source</title><summary type='text'>rem +--------------------------------------------------------------------------+rem | Script ID:     Exceptions.sqlrem |rem | Purpose:       Display a list of exception numbers assigned by Oracle.rem |               rem | Developer:     Lynn Tobiasrem | Script Date:   3/12/2009rem | Oracle Ver:    10grem |rem | Table(s) Used: DBA_Sourcerem |               rem | Output:        Exceptions.Txtrem |</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/781387412847787212/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2009/03/oracle-exceptions-found-in-dbasource.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/781387412847787212'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/781387412847787212'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2009/03/oracle-exceptions-found-in-dbasource.html' title='Oracle Exceptions found in DBA_Source'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_nnCCr2HgeBs/SbkRqC21ArI/AAAAAAAAfkk/xfApt8HYYwg/s72-c/exceptions.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-2847719008415414396</id><published>2009-03-11T18:21:00.005-04:00</published><updated>2009-03-11T21:06:35.860-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linebreak'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Chr(10)'/><title type='text'>Line Breaks</title><summary type='text'>To get a line break in your output data, use 'Chr(10).'  It must be concatenated to the columns it's between  1* Select 'Hi' || Chr(10) || 'There' From DualSQL&gt; /HiThere</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/2847719008415414396/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2009/03/line-breaks.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/2847719008415414396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/2847719008415414396'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2009/03/line-breaks.html' title='Line Breaks'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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-7545721543212935140.post-6770677647994839925</id><published>2009-03-08T20:39:00.015-04:00</published><updated>2009-04-25T09:02:33.418-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Phone'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='RegExp'/><title type='text'>Regular Expressions</title><summary type='text'>The create table statement and all the code to produce this report can be found here.  Scroll down to the end to find the attachment: RegExp.SqlThis is the data the queries run against:Select * From Fam;NAME  PHONE           DSCR----- --------------- --------------------------------------------------------------------------------Me    555-123-0987    Fun-loving aunt with a lot of nieces and </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/6770677647994839925/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2009/03/regular-expressions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/6770677647994839925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/6770677647994839925'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2009/03/regular-expressions.html' title='Regular Expressions'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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-7545721543212935140.post-809385380718123968</id><published>2009-03-03T21:48:00.008-05:00</published><updated>2009-03-08T10:41:41.390-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NextVal'/><category scheme='http://www.blogger.com/atom/ns#' term='Sequence'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='CurrVal'/><title type='text'>Sequence Basics</title><summary type='text'>This shows how to create a basic sequence.  CurrVal will show what number was last used.  Whenever NextVal is referenced, the sequence gets incremented.Set Feedback Off Heading OffDrop Table TestTbl;Create Table TestTbl      ( Id   Number(4),        Note Varchar2(20) );Drop Sequence Test_Seq;Create Sequence Test_Seq         Increment By 1 Start With 1         NoMaxValue NoCache NoCycle;Insert </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/809385380718123968/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2009/03/sequence-basics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/809385380718123968'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/809385380718123968'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2009/03/sequence-basics.html' title='Sequence Basics'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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-7545721543212935140.post-1643239976078725831</id><published>2009-03-03T20:24:00.010-05:00</published><updated>2009-03-08T13:13:00.830-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Trigger'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Trigger - Check for Positive Values</title><summary type='text'>Create Or Replace Trigger PositiveOnly Before Insert Or Update Of DeptNo On Dept For Each RowBegin If :new.DeptNo -20100, 'Please insert a positive value'); End If;End PositiveOnly;/</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/1643239976078725831/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2009/03/trigger-check-for-positive-values.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/1643239976078725831'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/1643239976078725831'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2009/03/trigger-check-for-positive-values.html' title='Trigger - Check for Positive Values'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_nnCCr2HgeBs/Sa3YjLPrs5I/AAAAAAAAeok/jrbfr8MnjH4/s72-c/positiveonly.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-5657788718835610392</id><published>2009-02-27T12:30:00.005-05:00</published><updated>2009-03-08T12:33:24.833-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Partition'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Range &amp; List-Partitioned Tables</title><summary type='text'>A range partition allows Oracle to place data in a partition based on the input value being between two values. 'MaxValue' is used to hold everything higher than the previous value listed.  A list partition allows Oracle to place data in a partition based on the input value matching a value in the list. The 'Default' is used to hold everything not mentioned in the list.  For instance, in the </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/5657788718835610392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2009/02/range-list-partitioned-tables.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/5657788718835610392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/5657788718835610392'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2009/02/range-list-partitioned-tables.html' title='Range &amp; List-Partitioned Tables'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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-7545721543212935140.post-174270245771353916</id><published>2009-02-19T18:22:00.006-05:00</published><updated>2009-03-08T12:49:59.738-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Partition By'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Linking Tables'/><title type='text'>How to Find a Linking Table</title><summary type='text'>What do you do if you need to select data from two tables, but discover they have no common column?  You look for the table that links them.  As an example, I'm using the Oracle-supplied HR schema. This query will find the table (if there is one) that has a field in Locations, and also one in Regions.  (This is based on column names so if a column was named 'RegID', it would not match to '</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/174270245771353916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2009/02/how-to-find-linking-table.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/174270245771353916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/174270245771353916'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2009/02/how-to-find-linking-table.html' title='How to Find a Linking Table'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_nnCCr2HgeBs/SZ3qAqz3kCI/AAAAAAAAeM8/_fwE8Ds0k4c/s72-c/connect3.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-292288980858964373</id><published>2009-02-16T21:14:00.017-05:00</published><updated>2009-03-08T12:53:09.191-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mailing Labels'/><category scheme='http://www.blogger.com/atom/ns#' term='Labels'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><title type='text'>Printing Labels from SQL through HTML</title><summary type='text'>I recently needed to print 3-up address labels with the same information on each.  I used a combination of padding, and adjusting the margins in the browser 'Page Setup' to get these to print in the perfs.This title shows in the browser title, and tab:  Head "&lt;Title&gt;Test Labels&lt;/Title&gt;       Where there are four options, they are in this order: top right bottom left.Styles are Dotted Dashed Solid</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/292288980858964373/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2009/02/printing-lables-from-sql-through-html.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/292288980858964373'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/292288980858964373'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2009/02/printing-lables-from-sql-through-html.html' title='Printing Labels from SQL through HTML'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_nnCCr2HgeBs/SZoduPuk66I/AAAAAAAAeMM/THhwD3L4UB0/s72-c/labels.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-3598552702272544947</id><published>2009-02-10T20:09:00.005-05:00</published><updated>2009-03-12T08:05:38.576-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Alpha'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='Translate'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='RegExp'/><title type='text'>List Rows with at Least One Alpha Character</title><summary type='text'>How this is done is based on the version.  If you're running 10 or greater, you can use a regular expression. The first example looks for any alphabetic character; the second for anything not numeric.10g Example 1:Select Postal_Code  From Hr.Locations Where Regexp_Like(Postal_Code,'[[:alpha:]]{1}');POSTAL_CODE------------M5V 2L7YSW 9T2OX9 9ZB3029SK10g Example 2:Select Postal_Code  From </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/3598552702272544947/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2009/02/list-rows-with-at-least-one-alpha.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/3598552702272544947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/3598552702272544947'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2009/02/list-rows-with-at-least-one-alpha.html' title='List Rows with at Least One Alpha Character'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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-7545721543212935140.post-3545275879618917595</id><published>2009-01-21T17:28:00.007-05:00</published><updated>2009-03-20T14:58:14.259-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Constraints'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='Create Table'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Creating Constraints When Creating a Table</title><summary type='text'>Have you ever created a table with 'Create ... as Select ...', and that was so easy and automatic, you wondered why all the constraints didn't just pop into place?  Well, after coding for a bit, I realized it was quite a bit more complicated than I initially thought.  In fact, the query got long enough that I stored it as an attachment: Create_Constraints.SQL.As shown in the screen print, you </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/3545275879618917595/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2009/01/creating-constraints-when-creating.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/3545275879618917595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/3545275879618917595'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2009/01/creating-constraints-when-creating.html' title='Creating Constraints When Creating a Table'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_nnCCr2HgeBs/SXenxb2ZdaI/AAAAAAAAb5o/LHj2vCO5qEo/s72-c/createconstraints.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-1490709862583907900</id><published>2008-12-24T00:38:00.005-05:00</published><updated>2008-12-24T00:45:58.543-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Column_name'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Column Information</title><summary type='text'>I use this code for investigating fields in the database.  It switches to the system user when you provide the password.  (It stores the old user so it can be restored at the end.)All the information for that column is read from DBA_Tab_Columns and written in HTML format.  Firefox will load to display the data.  (It is assumed that the program can be found at C:\Program Files\Mozilla Firefox1\</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/1490709862583907900/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/12/column-information.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/1490709862583907900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/1490709862583907900'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/12/column-information.html' title='Column Information'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_nnCCr2HgeBs/SVHL-q_NipI/AAAAAAAAY1o/ALOoUySxlNs/s72-c/fld1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-2551152079112149079</id><published>2008-12-22T23:17:00.004-05:00</published><updated>2008-12-22T23:49:48.451-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Backup'/><title type='text'>Create Hot Backup Script</title><summary type='text'>This script creates another script that will back up an active database.  It prompts for the system password, and then make a directory on the root of the C drive called 'Backup'+ today's date.It writes a file called HotBkUp+today's date into the default directory, which will then need to be run to perform the actual backup.This makes two copies of the control file -- one is written to the root.</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/2551152079112149079/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/12/create-hot-backup-script.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/2551152079112149079'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/2551152079112149079'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/12/create-hot-backup-script.html' title='Create Hot Backup Script'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_nnCCr2HgeBs/SVBrbPQu2HI/AAAAAAAAY1g/w-GcF1YydoU/s72-c/hotbkup.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-3800060500183662126</id><published>2008-12-21T17:52:00.006-05:00</published><updated>2008-12-21T18:06:33.347-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Partition By'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><title type='text'>Discrepancies Between Schemas</title><summary type='text'>This report shows discrepancies between schemas.  It can be helpful when you are in development, and trying to keep a test schema matching the production one.  This report is actually three reports that show the following:1) Missing tables in one or the other2) Discrepancies found in Tables and Columns3) Discrepancies in the Number of Columns in TablesThe first line of code is 'Define OnOff = Off</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/3800060500183662126/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/12/discrepancies-between-schemas.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/3800060500183662126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/3800060500183662126'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/12/discrepancies-between-schemas.html' title='Discrepancies Between Schemas'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_nnCCr2HgeBs/SU7I7gd7wyI/AAAAAAAAY1Y/hSV9nqz7dXQ/s72-c/alldif.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-7825786106284420312</id><published>2008-12-20T19:01:00.007-05:00</published><updated>2008-12-20T23:24:55.725-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Login.sql'/><category scheme='http://www.blogger.com/atom/ns#' term='Generating Code'/><title type='text'>Generating Column Formatting for SQL+</title><summary type='text'>This code sets up column formatting for every column in User_Tab_Columns.  The column names are stacked, breaking on the underscore.  Since alpha titles aren't displayed in full if not enough space is allocated, a decision is made as to whether a column part name or if the data field is longer.As a place to start, it sets up any field longer than 30 characters to A30, but adds 'Word_wrap.'  Any </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/7825786106284420312/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/12/generating-column-formatting-for-sql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/7825786106284420312'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/7825786106284420312'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/12/generating-column-formatting-for-sql.html' title='Generating Column Formatting for SQL+'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_nnCCr2HgeBs/SU3EH3Z-dyI/AAAAAAAAYzI/aXY0yRQAhy4/s72-c/ucol1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-6685739163252604954</id><published>2008-12-18T10:07:00.006-05:00</published><updated>2010-05-03T10:48:21.024-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Pivot'/><category scheme='http://www.blogger.com/atom/ns#' term='By'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Connect by'/><title type='text'>Pivot with Connect_By</title><summary type='text'>
This is a different version of the pivot that I hadn't seen.  I wanted to be able to find it so I listed it here.  The original code can be found in an article by Younes Naguib.Column Name_List Format A100

Select Deptno, 
              -- use the substring to get rid of the initial comma
              ----------------------------------------------------
              Substr(Sys_Connect_By_Path(</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/6685739163252604954/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/12/pivot-with-connectby.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/6685739163252604954'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/6685739163252604954'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/12/pivot-with-connectby.html' title='Pivot with Connect_By'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_nnCCr2HgeBs/SUpzzmqxvQI/AAAAAAAAYx4/g8HkJU90aog/s72-c/pivot2.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-2956482555078774452</id><published>2008-11-20T10:19:00.005-05:00</published><updated>2008-11-20T10:31:22.457-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Loop'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>How to Loop in SQL</title><summary type='text'>I recently saw a request for a For Loop executed with plain old SQL so I decided to create my own version.  The report you see was built by running the code once for each character in the name. This required four queries: one to set it up, and one to end it.  The other two are the actual code, and then one to decide whether to loop or not.(If you want to see everything behind the scenes, set </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/2956482555078774452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/11/how-to-loop-in-sql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/2956482555078774452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/2956482555078774452'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/11/how-to-loop-in-sql.html' title='How to Loop in SQL'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_nnCCr2HgeBs/SSWAUmuadWI/AAAAAAAAXXI/PjQ7HPJjuZg/s72-c/loop.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-8176850645116149875</id><published>2008-11-14T06:09:00.014-05:00</published><updated>2008-11-19T00:09:23.231-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Functions'/><category scheme='http://www.blogger.com/atom/ns#' term='PL/SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='Dates'/><title type='text'>Validate a Date</title><summary type='text'>This function validates a date and returns a boolean value.  The date must be in one of these formats:d-mmm-yy   dd-mmm-yy  d-mmm-yyyy       dd-mmm-yyyyIt will return either True for a valid date or False for an invalid date.  The month can be capitalized or not.An example of a call to the function:Set Serveroutput OnBegin   Dbms_Output.Put_Line(Case When ValDt('&amp;test_Date')</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/8176850645116149875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/11/validate-date.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/8176850645116149875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/8176850645116149875'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/11/validate-date.html' title='Validate a Date'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_nnCCr2HgeBs/SR1doYW13kI/AAAAAAAAXVI/leKmcpC_1ZY/s72-c/valdt.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-972250444656695642</id><published>2008-11-13T23:01:00.001-05:00</published><updated>2008-11-13T23:11:21.508-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='User'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Create a New User</title><summary type='text'>--+--------------------------------------------------------------| CrUser.Sql--| Script To Create New User--+------------------------------------------------------------Accept UserName Prompt 'Enter name of user to create: 'Drop User &amp;UserName Cascade;Create User &amp;UserName    Identified By &amp;UserName   Default Tablespace Users   --Temporary Tablespace Temp  /* automatic in 10 and 11 */   Quota 0 </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/972250444656695642/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/11/create-new-user.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/972250444656695642'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/972250444656695642'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/11/create-new-user.html' title='Create a New User'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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-7545721543212935140.post-5514166834044106465</id><published>2008-11-12T11:37:00.004-05:00</published><updated>2008-12-21T17:07:35.775-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Active Sessions'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='Sessions'/><title type='text'>Display Active Database Sessions</title><summary type='text'>The code was just a tad long, and nothing particularly interesting, so it can be downloaded from my web site.  It is named Active_DB.sql</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/5514166834044106465/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/11/display-active-database-sessions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/5514166834044106465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/5514166834044106465'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/11/display-active-database-sessions.html' title='Display Active Database Sessions'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_nnCCr2HgeBs/SRsIXVi2JMI/AAAAAAAAXSg/m2Xv8P5P8ns/s72-c/active_db.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-5383175779647656137</id><published>2008-11-02T05:16:00.006-05:00</published><updated>2009-12-29T23:09:28.945-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Scott'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='HR'/><category scheme='http://www.blogger.com/atom/ns#' term='Schemas'/><title type='text'>Oracle's HR Schema</title><summary type='text'>I'm trying to break up with Scott. This is one of the new schemas Oracle creates as a learning tool. Note all table names are plural.HR is for Human Resources.I have this shown as a model from the new Oracle SQL Developer Data Modeling.For more detail, see Oracle documentation on HR.</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/5383175779647656137/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/11/oracles-hr-schema.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/5383175779647656137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/5383175779647656137'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/11/oracles-hr-schema.html' title='Oracle&apos;s HR Schema'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_nnCCr2HgeBs/SQ1-yMssADI/AAAAAAAAW8E/TUqf_7_RUr0/s72-c/HR1.PNG.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-4187684997095148979</id><published>2008-11-02T01:11:00.005-04:00</published><updated>2009-01-27T21:25:27.649-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='Update'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Update a Table Based on Data from Another Table</title><summary type='text'>This first update is supplying data to TableA from TableB if either field is missing.Update TableA a   Set (         a.Field1       , a.Field2       ) = (            Select b.Field1                 , b.Field2              From TableB b             Where b.Key = a.Key           )Where Field1 Is Null   Or Field2 Is Null;The second example updates TableA with the data from TableB. The 'Where Exists'</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/4187684997095148979/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/11/update-table-based-on-data-from-another.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/4187684997095148979'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/4187684997095148979'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/11/update-table-based-on-data-from-another.html' title='Update a Table Based on Data from Another Table'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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-7545721543212935140.post-4387123584173511321</id><published>2008-11-01T19:13:00.001-04:00</published><updated>2008-11-01T19:16:12.294-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Flashback'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Flashback Table to One Minute Ago</title><summary type='text'>What to do when you've messed up?Alter Table table1  Enable Row Movement;Flashback Table table1  To Timestamp (Systimestamp - Interval '1' Minute);</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/4387123584173511321/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/11/flashback-table-to-one-minute-ago.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/4387123584173511321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/4387123584173511321'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/11/flashback-table-to-one-minute-ago.html' title='Flashback Table to One Minute Ago'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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-7545721543212935140.post-7482999360331741437</id><published>2008-10-31T14:12:00.005-04:00</published><updated>2008-10-31T14:40:56.658-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DOS'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Run a SQL Query from DOS</title><summary type='text'>This is a DOS batch file that will be run at the DOS prompt.  You must supply the user, password, and the SQL query name you wish to run.  For example:Since the SQL query must have an 'EXIT' statement at the end, I've actually had this batch file call a two-line query that calls the query you requested, and then exits.  This batch file assumes that all your code is in a directory called 'Data', </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/7482999360331741437/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/this-is-one-way-to-run-queries-from-dos.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/7482999360331741437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/7482999360331741437'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/this-is-one-way-to-run-queries-from-dos.html' title='Run a SQL Query from DOS'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_nnCCr2HgeBs/SQtNJQ8n7GI/AAAAAAAAW7M/aLrsGBx-5pA/s72-c/dos1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-1788276256210829029</id><published>2008-10-25T12:59:00.006-04:00</published><updated>2008-11-04T09:08:14.002-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PL/SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Thanks'/><category scheme='http://www.blogger.com/atom/ns#' term='Count Rows'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='Execute Immediate'/><title type='text'>Execute Immediate: Count Rows in All Tables</title><summary type='text'>The EXECUTE IMMEDIATE statement allows you to build a statement on-the-fly.  This is useful if you don't know the name of a table or the where conditions in advance.  In this case, we'll get each table name in the schema and then ask for a count.  Since this list will vary from time to time, the Execute Immediate makes sure we get a complete list.Clear ScreenPrompt This will display the record </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/1788276256210829029/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/execute-immediate-count-rows-in-all.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/1788276256210829029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/1788276256210829029'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/execute-immediate-count-rows-in-all.html' title='Execute Immediate: Count Rows in All Tables'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_nnCCr2HgeBs/SQNQ-2Lon3I/AAAAAAAAW38/mNCzjLA_f-M/s72-c/ei.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-7715146102033209629</id><published>2008-10-24T23:54:00.004-04:00</published><updated>2008-10-25T09:49:43.427-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>HR Tables: Keys Used in Joins</title><summary type='text'>Column Countries   Format A15Column Departments Format A15Column Employees   Format A15Column Jobs        Format A15Column Job_History Format A15Column Locations   Format A15Column Regions     Format A15Set Markup Html On Entmap On Spool On Preformat OffSet Term OffSpool Fk.HtmSet Heading OffColumn Title Entmap OffSelect '&lt;Center&gt;&lt;H1&gt;Hr Tables : Keys Used In Joins&lt;/H1&gt;&lt;/Center&gt;' As Title  From </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/7715146102033209629/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/hr-tables-keys-used-in-joins.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/7715146102033209629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/7715146102033209629'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/hr-tables-keys-used-in-joins.html' title='HR Tables: Keys Used in Joins'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_nnCCr2HgeBs/SQKYtfApVvI/AAAAAAAAW3s/aWbpAc2o7Pc/s72-c/hrtables.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-7685824443321879056</id><published>2008-10-24T14:09:00.007-04:00</published><updated>2009-03-11T18:18:04.395-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Partition By'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='Discrepancies'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Finding Discrepancies in Column Definitions</title><summary type='text'>When setting up tables in a schema, you may want to assure that your column definitions are the same as those already defined.  This query will count how many times each column is found, and how many unique variations there are in the type and length.  If the counts are identical, they are omitted from the report.  In the above example, there are three fields named 'CATEGORY'; a length of 20 was </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/7685824443321879056/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/finding-discrepancies-in-column.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/7685824443321879056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/7685824443321879056'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/finding-discrepancies-in-column.html' title='Finding Discrepancies in Column Definitions'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_nnCCr2HgeBs/SQIP1qbq2dI/AAAAAAAAW3k/lNnI4kAUnqg/s72-c/discrepancies.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-176783958482825106</id><published>2008-10-22T14:22:00.005-04:00</published><updated>2008-10-24T23:01:22.241-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Title'/><category scheme='http://www.blogger.com/atom/ns#' term='Reserved Words'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Reserved Words</title><summary type='text'>[A]AllAlterAndAnyAsAsc[B]BetweenBy[C]CharCheckClusterCompressConnectCreate[D]DateDecimalDefaultDeleteDescDistinctDrop[E]ElseExclusiveExists[F]FloatForFrom[G]GrantGroup[H]Having[I]IdentifiedInIndexInsertIntegerIntersectIntoIs[L]LikeLockLong[M]MinusMode[N]NocompressNotNowaitNullNumber[O]OfOnOptionOrOrder[P]PctfreePriorPublic[R]RawRenameResourceRevoke[S]SelectSetShareSizeSmallintStartSynonym[T]</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/176783958482825106/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/reserved-words.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/176783958482825106'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/176783958482825106'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/reserved-words.html' title='Reserved Words'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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-7545721543212935140.post-6479497123159829489</id><published>2008-10-22T13:05:00.007-04:00</published><updated>2010-02-20T16:07:55.253-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Calendar'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='Conditional Prompt'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Display a Calendar and Prompt for a Date</title><summary type='text'>The code for the calendar procedure was found on OTN and was created by Pablo Rovedo, DBA at ADEA S.A., in Buenos Aires, Argentina.My script gets the current month and year, and passes it to the procedure.  I then prompt the user for the day of the month.  The goal of this is to run a report based on a date.  If the users picks something later than the Sysdate, they are prompted with an error </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/6479497123159829489/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/display-calendar-and-prompt-for-date.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/6479497123159829489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/6479497123159829489'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/display-calendar-and-prompt-for-date.html' title='Display a Calendar and Prompt for a Date'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_nnCCr2HgeBs/SP9hmejRAGI/AAAAAAAAW3c/HlU2QTPUaDU/s72-c/dom.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-6190322593354602387</id><published>2008-10-22T11:40:00.005-04:00</published><updated>2008-11-19T00:33:38.368-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Schemas'/><title type='text'>Schema Space Consumption</title><summary type='text'>Set Pagesize 100Column GB    Format 99.99Column Owner Format A30Break on ReportCompute Sum of GB on ReportSelect        RPad(Owner,30,' .')            As       Owner,        -------------------------------------------------------              Round ( Sum(Sum_Bytes) / 1024 / 1024 / 1024, 2 )             As       Gb  From       --+----------------------------------------------------       (</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/6190322593354602387/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/schema-space-consumption.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/6190322593354602387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/6190322593354602387'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/schema-space-consumption.html' title='Schema Space Consumption'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_nnCCr2HgeBs/SP9KR1SgwYI/AAAAAAAAW3U/XTVfYAqPpC8/s72-c/spaceconsumption.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-7442450398222862770</id><published>2008-10-21T18:57:00.004-04:00</published><updated>2008-10-21T19:14:52.613-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Join'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>An Example of Ansi Joins with Multiple Tables</title><summary type='text'>These tables are from the HR schema.  I'm showing two examples, one uses 'Using' and the other with the 'On.'         Select r.Region_Name              , c.Country_Name              , l.State_Province              , d.Department_Name              , e.Last_Name               , e.Job_Id           From Regions     R           Join Countries   C On r.Region_Id     = c.Region_IdFull Outer Join </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/7442450398222862770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/example-of-ansi-joins-with-multiple.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/7442450398222862770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/7442450398222862770'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/example-of-ansi-joins-with-multiple.html' title='An Example of Ansi Joins with Multiple Tables'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_nnCCr2HgeBs/SP5hU-sdMYI/AAAAAAAAW3M/eBNq9BrQ3Yo/s72-c/hr.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-5430425960968893861</id><published>2008-10-21T17:20:00.007-04:00</published><updated>2011-08-11T10:59:50.382-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Constraints'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='Global Temporary Table'/><category scheme='http://www.blogger.com/atom/ns#' term='Long'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>List All Constraints in a Schema</title><summary type='text'> This report was modified so it could fit in this blog. 


The actual code can be found on my web site as an attachment: UserCons.Sql</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/5430425960968893861/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/list-all-constraints-in-schema.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/5430425960968893861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/5430425960968893861'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/list-all-constraints-in-schema.html' title='List All Constraints in a Schema'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_nnCCr2HgeBs/SP5Hr8xaW2I/AAAAAAAAW3E/kxOGefLxKyE/s72-c/CONSTRAINTS.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-3409378601578842096</id><published>2008-10-21T12:15:00.001-04:00</published><updated>2008-10-21T12:16:45.925-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Percentage'/><title type='text'>Show the Percentage of Records that Meet a Criteria</title><summary type='text'>Select Round(Part/Whole*100,1)||'%' PercentageFrom     (Select Count(*) Whole From Emp                  ),     (Select Count(*) Part  From Emp Where Deptno = 30);Percentage----------42.9%</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/3409378601578842096/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/show-percentage-of-records-that-meet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/3409378601578842096'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/3409378601578842096'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/show-percentage-of-records-that-meet.html' title='Show the Percentage of Records that Meet a Criteria'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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-7545721543212935140.post-1036108032009205194</id><published>2008-10-21T11:52:00.004-04:00</published><updated>2008-10-21T12:00:11.726-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Where'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Where: How to Search for Various Conditions</title><summary type='text'>This query presents the operator with a choice of how to find data.  After selecting a search field, and entering a value, a decode is used to generate SQL code.  The New_Value clause sets that equal to &amp;xWhere, and it is used with the 'Where' clause.  (I have tried incorporating it directly into the Where with no luck.)PromptPrompt                +------------------------------------------+</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/1036108032009205194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/where-how-to-search-for-various.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/1036108032009205194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/1036108032009205194'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/where-how-to-search-for-various.html' title='Where: How to Search for Various Conditions'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_nnCCr2HgeBs/SP37KEBzPsI/AAAAAAAAW28/Q1OplsWEl60/s72-c/where.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-8854518664585403346</id><published>2008-10-21T11:14:00.003-04:00</published><updated>2008-10-24T23:02:47.791-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sample'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Data Samples</title><summary type='text'>SAMPLE [ BLOCK ] (sample_percent)  [ SEED (seed_value) ]See the Select  statement in the Oracle® SQL Reference for exceptions, refinements, and cautions regarding 'Block', 'Seed', etc.SQL&gt; Select Count(*) From Employees; COUNT(*)----------      107 1  Select Employee_Id, First_Name, Last_Name 2*   From Employees Sample(10);EMPLOYEE_ID FIRST_NAME           LAST_NAME----------- --------------------</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/8854518664585403346/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/data-samples.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/8854518664585403346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/8854518664585403346'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/data-samples.html' title='Data Samples'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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-7545721543212935140.post-1300999707525353022</id><published>2008-10-21T10:31:00.006-04:00</published><updated>2009-01-27T13:23:26.677-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Partition By'/><category scheme='http://www.blogger.com/atom/ns#' term='Delete'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='Duplicates'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Rowid'/><title type='text'>Delete Duplicate Records</title><summary type='text'>This logic was found on PL/SQL Pipeline:To test, insert a duplicate 'SMITH' on the EMP TABLE:Insert Into Emp Values(9999,'SMITH','CLERK',7902,'17-DEC-80',800,NULL,20);Commit;You can see what is happening in the above report, and how a record is being chosen for deletion by running the following query. Records are being ranked (and a RowId saved) by breaking all the employees into partitions based</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/1300999707525353022/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/delete-duplicate-records.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/1300999707525353022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/1300999707525353022'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/delete-duplicate-records.html' title='Delete Duplicate Records'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_nnCCr2HgeBs/SP3pjA4Ll8I/AAAAAAAAW20/ja5lJrOfClQ/s72-c/deldup.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-2883793853921897519</id><published>2008-10-21T10:08:00.003-04:00</published><updated>2008-10-31T15:05:55.189-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='Decode'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Case'/><title type='text'>Case vs. Decode</title><summary type='text'>The DECODE and CASE statements can generate the same report as shown on the right.  The Case statement (which has two variations) is newer and has several advantages over the Decode.offers more flexibility and logical power (see Case Examples)easier to read than DECODEoffers better performance as wellDECODE(value,if1,then1[,if2,then2,]...,else)value can be any column or the result of a </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/2883793853921897519/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/case-vs-decode.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/2883793853921897519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/2883793853921897519'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/case-vs-decode.html' title='Case vs. Decode'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_nnCCr2HgeBs/SP3dIeDFG8I/AAAAAAAAW2s/vo_Ty1b7qLk/s72-c/case.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-8066898572488471682</id><published>2008-10-21T09:22:00.003-04:00</published><updated>2008-10-21T09:28:16.658-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='User'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Schemas'/><title type='text'>Oracle User and Schema</title><summary type='text'>Who am I?SQL&gt; Select Instance_Name From v$Instance;INSTANCE_NAME----------------orcl10SQL&gt; Select Name From v$Database;NAME---------ORCL10SQL&gt; Select User From Dual;USER------------------------------SCOTT</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/8066898572488471682/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/oracle-user-and-database.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/8066898572488471682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/8066898572488471682'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/oracle-user-and-database.html' title='Oracle User and Schema'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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-7545721543212935140.post-427419961455018043</id><published>2008-10-20T23:39:00.005-04:00</published><updated>2008-10-21T07:18:59.102-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NullIf'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Nullif</title><summary type='text'>The NullIf statement compares one value with another.  If they match, it returns null, otherwise it returns the first.  In this example, the NullIf, and the following Case statement get the same results.Column Employee_Id  Heading Employee|IdColumn NullIf_JobId Heading NullIf|(E_Job_Id)Column Case_JobID   Heading Case|(E_Job_Id)Column Equals       Heading '='Column E_Job_Id     Heading E.|</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/427419961455018043/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/nullif.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/427419961455018043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/427419961455018043'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/nullif.html' title='Nullif'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_nnCCr2HgeBs/SP1PNxh79OI/AAAAAAAAW2c/n1aCq0DRn5A/s72-c/nullif.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-7084143963307706659</id><published>2008-10-20T20:56:00.004-04:00</published><updated>2008-10-20T21:09:03.151-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Partition By'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Distinct Count'/><title type='text'>Find Discrepancies with 'Distinct Count Over'</title><summary type='text'>In this query, I'm looking for discrepancies in data.  In particular, I want to find column names in the data dictionary which have more than one type of data assigned.  This is done by asking for a distinct count of data_types within a partition based on column_names.  The code then eliminates anything that has a count of one.Select *  From        (         Select Table_Name,                 </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/7084143963307706659/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/find-discrepancies-with-distinct-count.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/7084143963307706659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/7084143963307706659'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/find-discrepancies-with-distinct-count.html' title='Find Discrepancies with &apos;Distinct Count Over&apos;'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_nnCCr2HgeBs/SP0pKToI8YI/AAAAAAAAW2M/NR_UGJWxejw/s72-c/DISTINCTCOUNT.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-5197105139092421253</id><published>2008-10-20T19:15:00.011-04:00</published><updated>2008-10-20T21:42:45.069-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><title type='text'>Using Colors and Fonts in HTML Reports</title><summary type='text'>This is absolutely a sign of a person with too much time on their hands!  Colors &amp; fonts?  Who knows where this will lead.  Anyway, I usually use &lt;H1&gt; to indicate a title, but you can't if you want to set size, color or face; it will override these.There are many internet sites that give a list of all the colors, faces and sizes so I'm not going to list them here again.  I did want to make a note</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/5197105139092421253/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/using-colors-and-fonts-in-html-reports.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/5197105139092421253'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/5197105139092421253'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/using-colors-and-fonts-in-html-reports.html' title='Using Colors and Fonts in HTML Reports'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_nnCCr2HgeBs/SP0zNPAad9I/AAAAAAAAW2U/Dp3YBLHtEes/s72-c/htmlcolors.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-5319046184899464544</id><published>2008-10-20T16:14:00.017-04:00</published><updated>2011-07-23T07:36:07.163-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Hierarchy'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><category scheme='http://www.blogger.com/atom/ns#' term='Connect by'/><title type='text'>Connect By  Displayed as HTML</title><summary type='text'>
The Connect By displays the hierarchy of data. To generate the above report, we've indented the name by padding with three spaces for each level deep it is.  Since we don't want to pad the 1st level, subtracting one puts it in the right place.
Select Empno,
Lpad(' '          -- Print a space
,3*(Level-1)  -- Pad with spaces for 3 times one less than the level
)  ||  Ename  -- Join spaces with </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/5319046184899464544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/connect-by-displayed-as-html.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/5319046184899464544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/5319046184899464544'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/connect-by-displayed-as-html.html' title='Connect By  Displayed as HTML'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_nnCCr2HgeBs/SPznXwNhN9I/AAAAAAAAW1s/NXv2l5TjTAQ/s72-c/connecby2.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-1898739141574886554</id><published>2008-10-20T13:49:00.005-04:00</published><updated>2008-10-24T23:04:27.746-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Locks'/><category scheme='http://www.blogger.com/atom/ns#' term='Kill session'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>A Way to Resolve a Lock Conflict</title><summary type='text'>The following code generates two lines.  The first is a prompt to say what is going to happen, and the second is a 'KILL SESSION' statement.  Which session needs to be killed is determined by the Blocking_Session from V$Session.  This query does not actually run that line -- it just generates it.  After running this, the DBA can copy and paste the line as shown on the screen, or run KL.SQL to </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/1898739141574886554/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/way-to-resolve-lock-conflict.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/1898739141574886554'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/1898739141574886554'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/way-to-resolve-lock-conflict.html' title='A Way to Resolve a Lock Conflict'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_nnCCr2HgeBs/SPzF_r6q2bI/AAAAAAAAW1k/GvBFjvqy6Tw/s72-c/killlock.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-2473404660024831622</id><published>2008-10-17T14:10:00.011-04:00</published><updated>2010-03-16T23:06:26.952-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Reverse Engineer'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Modeler'/><category scheme='http://www.blogger.com/atom/ns#' term='HR'/><title type='text'>Data Modeler</title><summary type='text'>To reverse engineer a schema:
download the beta-version here.

Select File

Select Import

Select DB Catalog

Click 'Add' on the 'Connect to Database' window, and type in the requested info.
Select the schema.

Select the items you want.
To generate the DDL:Select View

Select DDL File Editor

Click Ok

Click Generate

A very complete example of reverse engineering by Lewis C
Oracle Users Guide </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/2473404660024831622/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/data-modeler.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/2473404660024831622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/2473404660024831622'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/data-modeler.html' title='Data Modeler'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_nnCCr2HgeBs/SPjiXxy8ydI/AAAAAAAAW0s/hbowWf1yMsM/s72-c/model.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-9147663673148241628</id><published>2008-10-16T19:26:00.007-04:00</published><updated>2008-10-26T21:53:06.665-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iSql+'/><category scheme='http://www.blogger.com/atom/ns#' term='XP'/><category scheme='http://www.blogger.com/atom/ns#' term='Enterprise Manager'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Run EM and iSQL*Plus From Windows XP</title><summary type='text'>Enterprise Manager:Type into the browser's address bar:http://localhost:1158/em/iSQL*Plus:Start the service and then type into the browser's address bar: http://localhost:5560/isqlplus/</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/9147663673148241628/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/run-em-and-isqlplus-from-windows-xp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/9147663673148241628'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/9147663673148241628'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/run-em-and-isqlplus-from-windows-xp.html' title='Run EM and iSQL*Plus From Windows XP'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_nnCCr2HgeBs/SQUe8EJoVkI/AAAAAAAAW4c/cpPDc-tFM-o/s72-c/portlist.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-9072791211662955224</id><published>2008-10-14T22:28:00.012-04:00</published><updated>2008-10-14T22:48:13.120-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Java - A Way to Manually Sort an Array</title><summary type='text'>public class mySort{  public static void main(String[] str)   {      int[] array1 = {53,43,33};      int idx2, idx1, temp;      //----------------------------------------------      // The 1st index is set to 0. On each loop it's       // compared against the length, and incremented.      //----------------------------------------------      for (idx1 = 0; idx1 &lt; array1.length; idx1++)      {</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/9072791211662955224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/java-way-to-manually-sort-array.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/9072791211662955224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/9072791211662955224'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/java-way-to-manually-sort-array.html' title='Java - A Way to Manually Sort an Array'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_nnCCr2HgeBs/SPVZ5-7n4AI/AAAAAAAAW0c/3Iuyw_ukDLg/s72-c/sort.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-8592170050738275899</id><published>2008-10-14T16:20:00.006-04:00</published><updated>2008-11-02T03:10:44.391-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Java - If / Else vs. Switch</title><summary type='text'>Both of these produce the exact same results:  if (opt == 1)        {         funcInst.func1();        }else if (opt == 2)        {         funcInst.func2();        }else        {         System.out.print("Invalid Option");        } switch(opt){  case 1  : funcInst.func1()                  ;             break;  case 2  : funcInst.func2()                  ;             break;  default : </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/8592170050738275899/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/java-ifelse-vs-switch.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/8592170050738275899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/8592170050738275899'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/java-ifelse-vs-switch.html' title='Java - If / Else vs. Switch'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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-7545721543212935140.post-7957356622051281437</id><published>2008-10-14T14:00:00.006-04:00</published><updated>2008-10-14T16:22:18.125-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Java - Change Code to Object-Oriented</title><summary type='text'>1. Move the main method to a script that will call the functions.2. Create a method for each step.3. Declare an object of the class.4. Call functions thru the object name.</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/7957356622051281437/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/java-change-code-to-object-oriented.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/7957356622051281437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/7957356622051281437'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/java-change-code-to-object-oriented.html' title='Java - Change Code to Object-Oriented'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_nnCCr2HgeBs/SPTkC3fjYrI/AAAAAAAAWzs/17ZldUxfzCg/s72-c/oo.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-45024868478030493</id><published>2008-10-13T13:57:00.007-04:00</published><updated>2008-11-02T03:19:14.271-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Conditional Call'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL*Plus'/><title type='text'>To Conditionally Call Code in SQL*Plus</title><summary type='text'>Since SQL*Plus has no 'If' options (outside of queries) you need a different way to conditionally call another query.  One way to do that is to have a query that checks for the condition you're looking for.  If it is found, &amp;Ex_If will be set to the name of the query I wish to run.  It is first undefined so we're ready for the next execution.  I use this when there are some statements I need to </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/45024868478030493/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/to-conditionally-call-code-in-sqlplus.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/45024868478030493'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/45024868478030493'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/to-conditionally-call-code-in-sqlplus.html' title='To Conditionally Call Code in SQL*Plus'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_nnCCr2HgeBs/SPObyiyVuKI/AAAAAAAAWzg/ymjonUxbYqc/s72-c/condrun.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-5806591698378752776</id><published>2008-10-12T13:46:00.010-04:00</published><updated>2009-12-22T19:50:04.126-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Column_name'/><category scheme='http://www.blogger.com/atom/ns#' term='External Tables'/><category scheme='http://www.blogger.com/atom/ns#' term='Table_Name'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Finding Names in Code</title><summary type='text'>This query will find column, table and variable names.  The column and table name are based on the data dictionary;  variable names are anything starting with '&amp;'.For example, the following code will generate the report as shown:Because of the length, the code is located on my web site as an attachment named NamesInCode.Sql.It gets the name of a query from the user.Creates an external table to </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/5806591698378752776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/finding-names-in-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/5806591698378752776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/5806591698378752776'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/finding-names-in-code.html' title='Finding Names in Code'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_nnCCr2HgeBs/SPI6eFKxW8I/AAAAAAAAWzQ/4yFMeB1Q26w/s72-c/namesincode.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-1730001979945415264</id><published>2008-10-11T11:36:00.010-04:00</published><updated>2010-02-10T22:46:45.717-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='To_Lob'/><category scheme='http://www.blogger.com/atom/ns#' term='Clob'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='Global Temporary Table'/><category scheme='http://www.blogger.com/atom/ns#' term='Long'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Searching a Long Field</title><summary type='text'>As you've probably found out, the Long field type (soon to be expired) is hard to work with.  You can't concatenate, use 'Like' or a host of other things.  See the error posted below when I try to find which views are based on the EMP table:SQL&gt; Set Linesize 2000 Pagesize 60SQL&gt; Column Text Format A100 Word_WrappedSQL&gt;SQL&gt; Select View_Name,2         Text3    From User_Views4   Where Upper(Text) </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/1730001979945415264/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/searching-long-field.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/1730001979945415264'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/1730001979945415264'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/searching-long-field.html' title='Searching a Long Field'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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-7545721543212935140.post-5775848424380266207</id><published>2008-10-10T20:02:00.006-04:00</published><updated>2009-04-25T08:58:02.034-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Procedures'/><category scheme='http://www.blogger.com/atom/ns#' term='External Tables'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='Translate'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Column'/><title type='text'>Display Column Names Not Found In Procedures</title><summary type='text'>This was written as a solution to a question posed on ITToolBox.  Because of it's length, it is stored as an attachment: Cols_Procs.SqlIt accepts a table name from the user.It finds all the source names where the table name supplied is found in the text.Based on that list, it creates a list of all the words in the text.These words are spooled, and then an external table is created.This external </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/5775848424380266207/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/display-columnnames-not-found-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/5775848424380266207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/5775848424380266207'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/display-columnnames-not-found-in.html' title='Display Column Names Not Found In Procedures'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_nnCCr2HgeBs/SQ2JspnGZUI/AAAAAAAAW8U/4-vhQrrtvtw/s72-c/colsprocs.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-8969697610384274875</id><published>2008-10-09T23:01:00.004-04:00</published><updated>2008-11-02T06:15:02.529-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Java - Arrays</title><summary type='text'>  Calling program:   public class runmyArray3{   public static void main(String[] str)   {      myArray3 m1 = new myArray3();      m1.getData();      m1.findLargest();    }}    Called program:   public class myArray3{    int[] n = new int[3];    int largest;    public void getData()    {        Scanner input = new Scanner(System.in);        for (int k = 0; k &lt; n.length; k++)        {            </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/8969697610384274875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/java-arrays.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/8969697610384274875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/8969697610384274875'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/java-arrays.html' title='Java - Arrays'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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-7545721543212935140.post-6677997130042088664</id><published>2008-10-09T16:46:00.002-04:00</published><updated>2008-10-09T16:46:34.793-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Java - JOptionPane</title><summary type='text'>import javax.swing.JOptionPane;public class jop{   public static void main( String args[] )   {      String output = "Hi There \n\n";      JOptionPane.showMessageDialog( null, output,         "JOptionPane Test",         JOptionPane.INFORMATION_MESSAGE );      System.exit( 0 );   }}</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/6677997130042088664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/java-joptionpane.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/6677997130042088664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/6677997130042088664'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/java-joptionpane.html' title='Java - JOptionPane'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_nnCCr2HgeBs/SNv2Tt62kxI/AAAAAAAAV6E/I45virpGqng/s72-c/jpane.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-2267206639119360726</id><published>2008-10-09T16:40:00.001-04:00</published><updated>2008-10-09T16:43:42.462-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Java - Check String 2</title><summary type='text'>public class cks{   public static void main(String args[])   {       String s1, s2, s3, s4, output;       s1 = new String("x");       s2 = new String("y");       s3 = new String("abc xyz");       s4 = new String("Abc Xyz");       output = "s1 = " + s1 + "\n" +                "s2 = " + s2 + "\n" +                "s3 = " + s3 + "\n" +                "s4 = " + s4 + "\n\n";       //------------------</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/2267206639119360726/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/java-check-string-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/2267206639119360726'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/2267206639119360726'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/java-check-string-2.html' title='Java - Check String 2'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_nnCCr2HgeBs/SNvSEIX9iyI/AAAAAAAAV58/vMwbDwMr0Ck/s72-c/cks.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-2541565364499533344</id><published>2008-10-09T16:37:00.002-04:00</published><updated>2008-10-09T16:44:40.942-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Java - Check String</title><summary type='text'>//// CheckString.java//public class CheckString{   public static void main(String arguments[])   {      // create an object      //String str =          "Roses are red" ;      String str = new String("Roses are red");      System.out.println("          1  ");      System.out.println("0123456789012");      System.out.println("Roses are red");      System.out.println(" ");      System.out.println("</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/2541565364499533344/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/java-check-string.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/2541565364499533344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/2541565364499533344'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/java-check-string.html' title='Java - Check String'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_nnCCr2HgeBs/SNvD9Tn56HI/AAAAAAAAV50/ta55WDmKU8M/s72-c/roses.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-4277799389483053677</id><published>2008-10-09T16:30:00.001-04:00</published><updated>2008-10-09T16:36:05.908-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Java - Loops</title><summary type='text'>FOR LOOP    for (int k=0; k &lt; 3; k++)    {       s1.readData();    }WHILE LOOP    int k = 0;    while (k &lt; 3)    {       s1.readData();       k++;    }INFINITE LOOP   for (;;)   {       s1.readData();       System.out.printf("Continue? Y/N ");       answer = userInput.nextLine();       if (answer.equalsIgnoreCase("y")) continue; else break;   }</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/4277799389483053677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/java-loops.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/4277799389483053677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/4277799389483053677'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/java-loops.html' title='Java - Loops'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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-7545721543212935140.post-8411804231169985040</id><published>2008-10-09T16:26:00.002-04:00</published><updated>2008-10-09T22:00:55.231-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Java - Calling Functions</title><summary type='text'>This is the program that is executed:public class callingClass{  public static void main(String[] args)  {     calledClass calledClassInstance = new calledClass();     calledClassInstance.function1();           calledClassInstance.staticFunction2(); //call static function with     calledClass.staticFunction2();         //instance name or class name  }}This is called:public class calledClass{  </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/8411804231169985040/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/java-calling-functions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/8411804231169985040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/8411804231169985040'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/java-calling-functions.html' title='Java - Calling Functions'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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-7545721543212935140.post-4317755949711589940</id><published>2008-10-07T16:09:00.005-04:00</published><updated>2008-10-07T16:31:19.986-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Stop'/><category scheme='http://www.blogger.com/atom/ns#' term='Start'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>How to Start and Stop Oracle Services on the PC</title><summary type='text'>Select 'Start' in WindowsChooseControl PanelAdministrative ToolsServicesFind the name of the Oracle services and create two batch files. StartAll.Batnet start OracleDBConsoleorcl10net start OracleOraDb10g_home1TNSListenernet start OracleServiceORCL10StopAll.Batnet stop OracleDBConsoleorcl10net stop OracleOraDb10g_home1TNSListenernet stop OracleServiceORCL10OracleServiceSID = (the Oracle Database </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/4317755949711589940/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/how-to-start-and-stop-oracle-services.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/4317755949711589940'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/4317755949711589940'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/how-to-start-and-stop-oracle-services.html' title='How to Start and Stop Oracle Services on the PC'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_nnCCr2HgeBs/SOvGz-1bujI/AAAAAAAAWyQ/7xe-OH1Miw0/s72-c/services.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-8696840347485031809</id><published>2008-10-07T14:49:00.000-04:00</published><updated>2008-10-07T14:50:22.286-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='/*+'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='Hints'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Hints</title><summary type='text'>SQL hints (the things between /*+    */ ) 1) There is no error posted if you type them wrong -- they just don't work. 2) If you use an alias in your FROM statement, you must use that and not the actual table name in the hint.</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/8696840347485031809/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/hints.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/8696840347485031809'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/8696840347485031809'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/hints.html' title='Hints'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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-7545721543212935140.post-8019361224836909682</id><published>2008-10-06T17:10:00.003-04:00</published><updated>2008-10-06T17:13:27.173-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><category scheme='http://www.blogger.com/atom/ns#' term='Blog'/><title type='text'>How to Put HTML in a Blog</title><summary type='text'>To post html code to the blog1) make sure there is no valid use of '~'.  If there is, switch to another character.2) search and replace the following in the order shown.FIND     REPLACE&lt;        ~lt;&gt;        ~gt;&amp;nbsp;   ~amp;nbsp;&amp;        ~amp;~        &amp;</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/8019361224836909682/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/how-to-put-html-in-blog.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/8019361224836909682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/8019361224836909682'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/how-to-put-html-in-blog.html' title='How to Put HTML in a Blog'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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-7545721543212935140.post-8640659152848391960</id><published>2008-10-05T05:57:00.004-04:00</published><updated>2008-10-05T06:07:53.362-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ORA-'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>ORA-01722: invalid number</title><summary type='text'>Normally, I have no problem renaming a column its original column name after some function.  This time, it's posting 'invalid number', but only after I inserted the 'Order by'.   1  Select To_Char(Trunc(Datetime) + (Trunc((Datetime - Trunc(Datetime)) *48) / 48), 'dd/Mm/Yy Hh:Mi') As Datetime  2       , Count(*)  3    From Ext_Ittbl1  4   Group By To_Char(Trunc(Datetime) + (Trunc((Datetime - Trunc</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/8640659152848391960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/ora-01722-invalid-number.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/8640659152848391960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/8640659152848391960'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/ora-01722-invalid-number.html' title='ORA-01722: invalid number'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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-7545721543212935140.post-8188110007422256770</id><published>2008-10-05T05:30:00.006-04:00</published><updated>2008-11-04T09:22:20.789-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Thanks'/><category scheme='http://www.blogger.com/atom/ns#' term='Time'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='Dates'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Time Intervals</title><summary type='text'>This request came from the ITToolBox.  Based on the following dataID DATETIME-- ----------- 1 10/03 09:00 2 10/03 09:01 3 10/03 09:20 4 10/03 09:31 5 10/03 10:00 6 10/03 10:10 7 10/03 10:40They wanted a total count in half-hour intervals.  Tom Falconer put together the logic for this.  I made a few refinements, and fixed a minor error, but had to keep this for future reference. The ID field shown</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/8188110007422256770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/time-intervals.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/8188110007422256770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/8188110007422256770'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/time-intervals.html' title='Time Intervals'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_nnCCr2HgeBs/SOiJn0efA1I/AAAAAAAAWp0/g89uf6g8DgM/s72-c/time4.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-7056561029612949849</id><published>2008-10-04T02:26:00.011-04:00</published><updated>2009-06-19T06:58:50.588-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Punctuation'/><category scheme='http://www.blogger.com/atom/ns#' term='9i'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='Translate'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Display All the Digits in a String (pre 10)</title><summary type='text'>Conn hr/hrSelect Translate(Phone_Number,' !"#$%&amp;''()*+,-./:;&lt;=&gt;?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~' ,' ') As       Digits,       Phone_Number  From Employees;With version 10, you can use Regexp_Replace as shown:Select Regexp_Replace('abcABC123^&amp;*','[^[:alnum:]]') From DualSQL&gt; /REGEXP_RE---------abcABC123</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/7056561029612949849/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/to-get-all-digit-in-string.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/7056561029612949849'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/7056561029612949849'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/10/to-get-all-digit-in-string.html' title='Display All the Digits in a String (pre 10)'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_nnCCr2HgeBs/SOcMvQ26ozI/AAAAAAAAWe4/4Eo5BUBlFSs/s72-c/digits.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-7315726598035619805</id><published>2008-09-30T18:41:00.005-04:00</published><updated>2008-10-24T23:05:59.233-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><title type='text'>HTML Formatting</title><summary type='text'>--+-------------------------------------------------------------------------------| Set Escape On To Use \&amp;nbsp; (space) \&amp;amp; (&amp;) \&amp;gt; (&gt;) \&amp;lt; (&lt;)--+-----------------------------------------------------------------------------Set Markup Html On   Entmap On   Spool    On   Preformat Off  Set Feedback    Off  Term   Off  Echo     Off  Verify    Off  Linesize 2000  Escape On --+----------------</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/7315726598035619805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/09/html-formatting.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/7315726598035619805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/7315726598035619805'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/09/html-formatting.html' title='HTML Formatting'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_nnCCr2HgeBs/SOKrPghpJBI/AAAAAAAAWS4/ac7HvT-s5c4/s72-c/html.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-7724719261324527142</id><published>2008-09-27T22:12:00.006-04:00</published><updated>2008-09-27T22:38:03.198-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DCBA'/><category scheme='http://www.blogger.com/atom/ns#' term='Instance'/><title type='text'>Create a New Instance on the PC</title><summary type='text'>1) SQL&gt; Shutdown2) SQL&gt; EXIT3) Windows Start      Control Panel         Administrative Tools            Services            - Stop all Oracle Services4) Start      All Programs         Oracle - OraDB10gHome            Configuration &amp; Migration Tools               Database Configuration Assistant5) Delete database (PC only supports one instance)6) Create database      Ignore      OK      Yes      </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/7724719261324527142/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/09/create-new-instance-on-pc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/7724719261324527142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/7724719261324527142'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/09/create-new-instance-on-pc.html' title='Create a New Instance on the PC'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_nnCCr2HgeBs/SN7s6nKv4gI/AAAAAAAAWMc/DJx00upYDGc/s72-c/services.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-5713972458157095872</id><published>2008-09-23T17:06:00.003-04:00</published><updated>2008-09-23T17:09:17.808-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Rollback'/><category scheme='http://www.blogger.com/atom/ns#' term='Delete'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Refcursor'/><title type='text'>Deleted Data Stored in Rollback Segments</title><summary type='text'>clear screenset echo on feedback on heading on pagesize 50variable emps refcursorbegin   open :emps for          select empno, ename           from emp          where empno &gt; 7800;end;/------------------------------------------------ deleted data is saved in a rollback segment----------------------------------------------delete from emp;commit;print emps</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/5713972458157095872/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/09/deleted-data-stored-in-rollback.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/5713972458157095872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/5713972458157095872'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/09/deleted-data-stored-in-rollback.html' title='Deleted Data Stored in Rollback Segments'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_nnCCr2HgeBs/SNlav0p-fCI/AAAAAAAAV40/U4HKyYLeEYA/s72-c/refcur1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-5003764202000876285</id><published>2008-09-22T19:58:00.020-04:00</published><updated>2008-10-20T13:06:53.546-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Locks'/><category scheme='http://www.blogger.com/atom/ns#' term='Table'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Lock Table</title><summary type='text'>window['frozRowHTable']=""window['rowHTables']="1234567"{var z={};z.id=18;z.nm='Locks';z.fx=[];z.rIds=[,0,1,3,5,8,101,16];z.cIds=[,20,6,7,8,9,10,11,12];z.eom='';var a;var x=[];x[0]=[];x[1]=[];x[2]=[];x[3]=[];x[4]=[];x[5]=[];x[6]=[];z.ci=x;window['_gi']=z;}.tblGenFixed td {padding:0 3px;overflow:hidden;white-space:normal;letter-spacing:0;word-spacing:0;background-color:#fff;z-index:1;border-top:</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/5003764202000876285/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/09/blog-post_9068.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/5003764202000876285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/5003764202000876285'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/09/blog-post_9068.html' title='Lock Table'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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-7545721543212935140.post-2002552445063875665</id><published>2008-09-17T10:33:00.008-04:00</published><updated>2008-09-24T22:13:10.410-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Data Dictionary'/><category scheme='http://www.blogger.com/atom/ns#' term='Chr(10)'/><title type='text'>DICT - Data Dictionary</title><summary type='text'>This query actually generates two reports.  The first shows all tables starting with 'User_' (indicated by the 'U'), 'All_' (indicated by the 'A') or 'DBA_' (indicated by the 'D').  The 'base_name' is what I consider the portion past User/All/DBA.  The report is sorted by this name.  A page break occurs based on the first letter.  A line break occurs based on the second part of this name, </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/2002552445063875665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/09/dict-data-dictionary.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/2002552445063875665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/2002552445063875665'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/09/dict-data-dictionary.html' title='DICT - Data Dictionary'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_nnCCr2HgeBs/SNEWD6syIEI/AAAAAAAAVv8/VBFaMPm7Ehg/s72-c/dict.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-2316969231388711026</id><published>2008-09-16T21:43:00.003-04:00</published><updated>2008-09-24T23:13:58.444-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='RegExp'/><title type='text'>Regular Expressions</title><summary type='text'>--Regular Expression Operators and Metasymbols-------------------------------------- Anchor to:------------------------------------ ^  the beginning of a string    ^A finds Alice, Alan-- $  the end of a string          g$ finds dog, lag------------------------------------ Match # times------------------------------------ *       &gt;= 0                    12*3    finds 13 123 1223 12223 -- +       &gt;</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/2316969231388711026/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/09/regular-expressions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/2316969231388711026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/2316969231388711026'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/09/regular-expressions.html' title='Regular Expressions'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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-7545721543212935140.post-4700490345065553320</id><published>2008-09-16T17:20:00.004-04:00</published><updated>2008-09-16T17:25:14.271-04:00</updated><title type='text'>To Separate Each Record With a Line</title><summary type='text'>Set RecSep EachSet RecSepChar '-'Select *  From Emp Where DeptNo = 20;</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/4700490345065553320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/09/to-separate-each-record-with-line.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/4700490345065553320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/4700490345065553320'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/09/to-separate-each-record-with-line.html' title='To Separate Each Record With a Line'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_nnCCr2HgeBs/SNAkC8ztySI/AAAAAAAAVv0/-HrvbF8atYc/s72-c/recsep.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-6208063925452075046</id><published>2008-09-16T17:07:00.007-04:00</published><updated>2008-10-30T21:48:17.526-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Break'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Chr(10)'/><title type='text'>Remove Line Breaks from Data</title><summary type='text'>If you have a column fornatted to hold the longest value, but data is still falling to a second line, it probably has a line break character in it.  This is coded as 'CHR(10).'  It can be replaced with a space to keep the value on one line as shown in the screen to the right.Column Comments Format A80Select Comments From DictWhere Table_Name = 'ALL_REFRESH_DEPENDENCIES';Select         Replace(</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/6208063925452075046/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/09/remove-line-breaks-from-data.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/6208063925452075046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/6208063925452075046'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/09/remove-line-breaks-from-data.html' title='Remove Line Breaks from Data'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_nnCCr2HgeBs/SNAgSGZ-NuI/AAAAAAAAVvs/VzdID3PM1rY/s72-c/break.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-6838126717821914731</id><published>2008-09-16T14:56:00.005-04:00</published><updated>2008-09-23T17:10:53.202-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='Schemas'/><title type='text'>Schemas</title><summary type='text'>SYScontains the data dictionarySYSTEMcontains additional tables and views that store administrative informationSample SchemasThe names are in alphabetical order, and specifies the order of creation.HR - Human Resourcesbasic topicsan extension supports Oracle Internet DirectoryOE - Order EntryHR must be installed and you have the password to itintermediate topicsmultitude of datatypesOracle </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/6838126717821914731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/09/schemas.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/6838126717821914731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/6838126717821914731'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/09/schemas.html' title='Schemas'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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-7545721543212935140.post-4188208320405216484</id><published>2008-09-16T12:02:00.002-04:00</published><updated>2008-09-16T12:04:18.782-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PL/SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Pivot'/><category scheme='http://www.blogger.com/atom/ns#' term='Loop'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>PL/SQL Loop Creates Pivot</title><summary type='text'>Declare   All_Depts Varchar2 (50) := '';   Cursor c_Loc Is                    -----------------------------------                    -- don't put ',' in front of 1st                    -----------------------------------      Select        Case When Rownum &lt;&gt; 1 Then ',' End                     ||                     Loc                     As              Loc        From Dept;Begin   For c_Each </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/4188208320405216484/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/09/plsql-loop-creates-pivot.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/4188208320405216484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/4188208320405216484'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/09/plsql-loop-creates-pivot.html' title='PL/SQL Loop Creates Pivot'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_nnCCr2HgeBs/SM_YybrGA4I/AAAAAAAAVvk/sTRyV3K0qpY/s72-c/loop.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-3309174200689446255</id><published>2008-09-16T11:11:00.007-04:00</published><updated>2008-12-08T18:10:39.347-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Variables'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='Bind'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Bind Variables in SQL Code</title><summary type='text'>@bind----------------------------------------------------------- Bind variables can be declared in your SQL*Plus script---------------------------------------------------------VARIABLE  s_table_name     varchar2(30)----------------------------------------------------------- Preface a bind variable with a colon to reference it-- in a PL/SQL block.---------------------------------------------------</summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/3309174200689446255/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/09/bind-variables-in-sql-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/3309174200689446255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/3309174200689446255'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/09/bind-variables-in-sql-code.html' title='Bind Variables in SQL Code'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_nnCCr2HgeBs/SM_Ouzgcb2I/AAAAAAAAVvc/cRilcGKJlhg/s72-c/bind.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7545721543212935140.post-2046836797726603759</id><published>2008-09-16T10:49:00.007-04:00</published><updated>2008-11-04T09:09:53.609-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Thanks'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='Sessions'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Process'/><title type='text'>Who's Running What?</title><summary type='text'>Ttitle Left "Who's Running What" Skip 2Set Linesize 200 Pagesize 200Column Sid      Format 999Column Serial#  Format 99999 Heading Serial|# Column Audsid   Format 99999 Heading Aud|SidColumn Username Format A10   Heading Db|UserColumn Osuser   Format A20   Heading Os|UserColumn Machine  Format A20   Heading MachineColumn Terminal Format A12   Heading TerminalColumn Process  Format A10   Heading </summary><link rel='replies' type='application/atom+xml' href='http://my-oracle-10g-tips.blogspot.com/feeds/2046836797726603759/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/09/whos-running-what.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/2046836797726603759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7545721543212935140/posts/default/2046836797726603759'/><link rel='alternate' type='text/html' href='http://my-oracle-10g-tips.blogspot.com/2008/09/whos-running-what.html' title='Who&apos;s Running What?'/><author><name>Lynn Tobias</name><uri>http://www.blogger.com/profile/17482100401250317666</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_nnCCr2HgeBs/SM_HyxMWpVI/AAAAAAAAVvU/JZg04uHT3cI/s72-c/si.png' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
