<?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-18167814</id><updated>2007-09-10T07:04:07.276+01:00</updated><title type='text'>William Robertson code</title><link rel='alternate' type='text/html' href='http://www.williamrobertson.net/feed/code.html'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.williamrobertson.net/feed/code-atom.xml'/><author><name>William Robertson</name></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>21</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-18167814.post-5811090682384883687</id><published>2007-04-22T21:24:00.000+01:00</published><updated>2007-09-10T07:01:45.430+01:00</updated><title type='text'>Sudoku solver 10g</title><content type='html'>Here is a 10g update of last year's 9i Sudoku solver. The row/column/square free values intersection code is simplified by the new MULTISET INTERSECT operator, the validation procedure now uses IS A SET, and I've used MEMBER OF in the new "cross hatching" algorithm. I also used some conditional compilation for diagnostic output.&lt;br /&gt;&lt;br /&gt;My original idea was to find the intersection of the three sets of free values for each cell - that is, the available values for the row, the column and the box. I thought this was pretty neat until I looked up Sudoku-solving and found that it was called "Candidate Elimination" (or &lt;a href="http://www.brainbashers.com/sudokuforcedmoves.asp"&gt;"Forced Move"&lt;/a&gt;) and regarded as the most basic approach used by beginners on simple puzzles.&lt;br /&gt;&lt;br /&gt;I built on this by adding a guessing loop, in which if the elimination approach cannot complete the puzzle, it takes each candidate value for each empty cell in turn, plugs that value in and retries the eliminator process. It turns out this is another standard technique, known variously as "What If", "Guess-and-Check", "Bifurcation", "Backtracking" or "Ariadne's thread".&lt;br /&gt;&lt;br /&gt;Version adds a second deduction approach, in which a possible value for a cell is checked to see if there is anywhere else it could go in its row. If not, then it must go in that cell. This seems to be known as "Cross hatching" within the Sudoku community.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Updated:&lt;/span&gt; version 4 now checks the current column and square, and can also eliminate values using a "what if" test, along with some internal refactoring I won't bore you with.&lt;br /&gt;&lt;br /&gt;The next straightforward algorithm I want to add in a future version is "matched groups", described in Wikipedia as follows:&lt;br /&gt;&lt;blockquote&gt;One method works by identifying "matched cell groups". For instance, if precisely two cells within a scope (a particular row, column, or region) contain the same two candidate numerals (p,q), or if precisely three cells within a scope contain the same three candidate numerals (p,q,r), these cells are said to be matched. The placement of those candidate numerals anywhere else within that same scope would make a solution impossible; therefore, those candidate numerals can be deleted from all other cells in the scope.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;I also want to add what the Brainbashers page calls &lt;a href="http://www.brainbashers.com/sudokuintersectionremoval.asp"&gt;Intersection Removal&lt;/a&gt;, in which for example you narrow down the location of the 5 within a box to one of two positions, and these fall within the same row or column: now even though you don't know exactly which position it goes in, you still have enough information to exclude the rest of that row or column.&lt;br /&gt;&lt;br /&gt;Now possibly by this point the code will be sufficiently complex that it would be simpler just to focus on a brute-force "check every possible combination" approach, but that seems to me to defeat the purpose - I wanted a solution using logical deduction.&lt;br /&gt;&lt;br /&gt;I should mention that the names in use for sudoku solving techniques seem to vary widely, and I originally made up some of my own before reading up on the subject. The excellent &lt;a href="http://www.brainbashers.com/sudokuhelp.asp"&gt;Brainbashers Sudoku Help&lt;/a&gt; site, for example, uses "Intersections" and "Pinned Squares" for what I call Locations (there is only one place for the 7 to go), "Forced Moves" for what I call Intersection (the only candidate value for the cell is 2), and &lt;a href="http://www.brainbashers.com/sudokulockedsets.asp"&gt;"Locked Sets"&lt;/a&gt; for what Wikipedia (see above) calls "Matched Groups" (actually I quite like this term and might use it myself). I also realise that I've used the word "square" where others have used "region" or "box".&lt;br /&gt;&lt;br /&gt;To install using SQL*Plus, either download &lt;a href="http://www.williamrobertson.net/code/sudoku_mk4.pls"&gt;sudoku-mk4.pls&lt;/a&gt; and run it from the &lt;tt&gt;SQL&gt;&lt;/tt&gt; prompt, or (if you trust me!) paste the following command directly into SQL*Plus:&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;@http://www.williamrobertson.net/code/sudoku_mk4.pls&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;To reinstall over an existing version, add the argument "rebuild":&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;@http://www.williamrobertson.net/code/sudoku_mk4.pls &lt;b&gt;rebuild&lt;/b&gt;&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;This will cleanly drop all sudoku_* types, avoiding type dependency issues.</content><link rel='alternate' type='text/html' href='http://www.williamrobertson.net/feed/2007/04/sudoku-solver-10g.html' title='Sudoku solver 10g'/><link rel='related' href='http://www.williamrobertson.net/code/sudoku_mk4.pls' title='Sudoku solver 10g'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18167814&amp;postID=5811090682384883687' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.williamrobertson.net/feed/code-atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/5811090682384883687'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/5811090682384883687'/><author><name>William Robertson</name></author></entry><entry><id>tag:blogger.com,1999:blog-18167814.post-116359577829380798</id><published>2006-11-15T13:01:00.000Z</published><updated>2007-02-17T18:47:38.329Z</updated><title type='text'>DBMS_ADVISOR tuning advice</title><content type='html'>One new feature in 10g is DBMS_ADVISOR, which analyses a specified query and recommend ways to improve performance. This script analyzes whatever query is in the SQL*Plus buffer, so when testing a query you can simply enter&lt;br /&gt;&lt;br /&gt;@tune</content><link rel='alternate' type='text/html' href='http://www.williamrobertson.net/feed/2006/11/dbmsadvisor-tuning-advice.html' title='DBMS_ADVISOR tuning advice'/><link rel='related' href='http://www.williamrobertson.net/code/tune.sql' title='DBMS_ADVISOR tuning advice'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18167814&amp;postID=116359577829380798' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.williamrobertson.net/feed/code-atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/116359577829380798'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/116359577829380798'/><author><name>William Robertson</name></author></entry><entry><id>tag:blogger.com,1999:blog-18167814.post-115767053966114702</id><published>2006-09-08T00:08:00.000+01:00</published><updated>2006-09-08T00:08:59.663+01:00</updated><title type='text'>SQL*Plus Index report</title><content type='html'>Report indexes for the specified table. Specify an index name to see details about that index (which table, what columns). Allows user.table, or user.index.</content><link rel='alternate' type='text/html' href='http://www.williamrobertson.net/feed/2006/09/sqlplus-index-report.html' title='SQL*Plus Index report'/><link rel='related' href='http://www.williamrobertson.net/code/ind.sql' title='SQL*Plus Index report'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18167814&amp;postID=115767053966114702' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.williamrobertson.net/feed/code-atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/115767053966114702'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/115767053966114702'/><author><name>William Robertson</name></author></entry><entry><id>tag:blogger.com,1999:blog-18167814.post-114289816823902157</id><published>2006-03-20T23:39:00.000Z</published><updated>2006-03-21T10:12:52.840Z</updated><title type='text'>Sudoku solver</title><content type='html'>The idea behind this solution is to find the intersect set of {row.freelist, column.freelist, square.freelist}. If that gives only one value, that must be the value of the cell. Now if row, column and square could all be instances of a Sudoku Element object type, and that had a free_list() method, it shouldn't be too hard to write...</content><link rel='alternate' type='text/html' href='http://www.williamrobertson.net/feed/2006/03/sudoku-solver.html' title='Sudoku solver'/><link rel='related' href='http://www.williamrobertson.net/code/sudoku.pls' title='Sudoku solver'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18167814&amp;postID=114289816823902157' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.williamrobertson.net/feed/code-atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/114289816823902157'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/114289816823902157'/><author><name>William Robertson</name></author></entry><entry><id>tag:blogger.com,1999:blog-18167814.post-113363837922796545</id><published>2005-12-03T19:28:00.000Z</published><updated>2005-12-03T19:32:59.240Z</updated><title type='text'>Utility assortment</title><content type='html'>ECHO (word-wrapper for DBMS_OUTPUT), TO_DECIMAL, TO_BASE (number conversion functions), SEND_MAIL (HTML formatted email), LIST_ELEMENT (string tokeniser), SPLIT, TO_STRING etc, all in one rather arbitrary package.</content><link rel='alternate' type='text/html' href='http://www.williamrobertson.net/feed/2005/12/utility-assortment.html' title='Utility assortment'/><link rel='related' href='http://www.williamrobertson.net/code/utilities.pkg.txt' title='Utility assortment'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18167814&amp;postID=113363837922796545' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.williamrobertson.net/feed/code-atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113363837922796545'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113363837922796545'/><author><name>William Robertson</name></author></entry><entry><id>tag:blogger.com,1999:blog-18167814.post-113363339779205190</id><published>2005-12-03T18:06:00.000Z</published><updated>2005-12-03T18:15:13.720Z</updated><title type='text'>Exception object</title><content type='html'>An Exception object you can pass around between procedures. It was a bit of an experiment and I haven't found a real use for it yet, but maybe that's just because I've been working on warehouse systems for a while. Let me know if you find a use for it!</content><link rel='alternate' type='text/html' href='http://www.williamrobertson.net/feed/2005/12/exception-object.html' title='Exception object'/><link rel='related' href='http://www.williamrobertson.net/code/exception_ot.typ.txt' title='Exception object'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18167814&amp;postID=113363339779205190' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.williamrobertson.net/feed/code-atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113363339779205190'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113363339779205190'/><author><name>William Robertson</name></author></entry><entry><id>tag:blogger.com,1999:blog-18167814.post-113363219491568868</id><published>2005-12-03T17:47:00.000Z</published><updated>2005-12-03T20:01:20.136Z</updated><title type='text'>Job control object</title><content type='html'>Job control modelled on Unix: declare "job" objects, submit them, wait for them to complete. Uses DBMS_JOB to submit tasks, DBMS_ALERT for jobs to pass back status and error messages, so the calling procedure can easily track the background jobs it started.</content><link rel='alternate' type='text/html' href='http://www.williamrobertson.net/feed/2005/12/job-control-object.html' title='Job control object'/><link rel='related' href='http://www.williamrobertson.net/code/job_ot.typ.txt' title='Job control object'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18167814&amp;postID=113363219491568868' title='2 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.williamrobertson.net/feed/code-atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113363219491568868'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113363219491568868'/><author><name>William Robertson</name></author></entry><entry><id>tag:blogger.com,1999:blog-18167814.post-113363200116671077</id><published>2005-12-03T17:41:00.000Z</published><updated>2005-12-03T20:02:44.643Z</updated><title type='text'>Timer object</title><content type='html'>Timer object to simplify the routine task of capturing start and end times and displaying formatted results. Includes "stop", "resume", "restart", "elapsed" and "show" methods.</content><link rel='alternate' type='text/html' href='http://www.williamrobertson.net/feed/2005/12/timer-object.html' title='Timer object'/><link rel='related' href='http://www.williamrobertson.net/code/timer.typ.txt' title='Timer object'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18167814&amp;postID=113363200116671077' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.williamrobertson.net/feed/code-atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113363200116671077'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113363200116671077'/><author><name>William Robertson</name></author></entry><entry><id>tag:blogger.com,1999:blog-18167814.post-113313901837392090</id><published>2005-12-01T00:44:00.000Z</published><updated>2005-12-03T17:34:15.126Z</updated><title type='text'>AVG and SUM for INTERVALs</title><content type='html'>Presumably due to an oversight, Oracle have not yet overloaded the SUM and AVG functions to support the INTERVAL DAY TO SECOND datatype. Here are my AVG_DSINTERVAL and SUM_DSINTERVAL aggregate/analytic functions.</content><link rel='alternate' type='text/html' href='http://www.williamrobertson.net/feed/2005/12/avg-and-sum-for-intervals.html' title='AVG and SUM for INTERVALs'/><link rel='related' href='http://www.williamrobertson.net/code/agg_dsinterval.typ.txt' title='AVG and SUM for INTERVALs'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18167814&amp;postID=113313901837392090' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.williamrobertson.net/feed/code-atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113313901837392090'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113313901837392090'/><author><name>William Robertson</name></author></entry><entry><id>tag:blogger.com,1999:blog-18167814.post-113000065464951211</id><published>2005-11-30T18:03:00.000Z</published><updated>2005-11-28T00:39:54.946Z</updated><title type='text'>Explain Plan Utility</title><content type='html'>My handy Explain Plan script for SQL*Plus. Just type:&lt;br /&gt;@xplan</content><link rel='alternate' type='text/html' href='http://www.williamrobertson.net/feed/2005/11/explain-plan-utility.html' title='Explain Plan Utility'/><link rel='related' href='http://www.williamrobertson.net/code/xplan.sql' title='Explain Plan Utility'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18167814&amp;postID=113000065464951211' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.williamrobertson.net/feed/code-atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113000065464951211'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113000065464951211'/><author><name>William Robertson</name></author></entry><entry><id>tag:blogger.com,1999:blog-18167814.post-113001331886957350</id><published>2005-11-29T21:34:00.000Z</published><updated>2006-09-03T14:41:40.170+01:00</updated><title type='text'>Which</title><content type='html'>Resolves an object name following the same resolution path as SQL or PL/SQL:&lt;br /&gt;e.g. given the name "EMP", figure out that it's a public synonym for SCOTT.EMPLOYEES.&lt;br /&gt;&lt;br /&gt;Usage - use any of the following:&lt;br /&gt;@which emp&lt;br /&gt;@which scott.emp&lt;br /&gt;@which em%&lt;br /&gt;&lt;br /&gt;The report is in two parts. First it queries DBA_OBJECTS (or if that is not accessible it will automaticallly switch to ALL_OBJECTS) for any matching objects. The results include whether there is a synonym and whether you have been granted access. Then it calls DBMS_UTILITY.NAME_RESOLVE, which prior to 9i resolved the names of stored code (packages, procedures etc) but in recent versions has been extended to other database objects such as tables.&lt;br /&gt;&lt;br /&gt;If you use a wildcard, the report will stop after querying DBA_OBJECTS.&lt;br /&gt;&lt;br /&gt;It is possible for an object to appear in the first part of the results because it was found in DBA_OBJECTS, but not actually be resolvable, for example because it resides in another schema and you are missing a synonym.</content><link rel='alternate' type='text/html' href='http://www.williamrobertson.net/feed/2005/11/which.html' title='Which'/><link rel='related' href='http://www.williamrobertson.net/code/which.sql' title='Which'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18167814&amp;postID=113001331886957350' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.williamrobertson.net/feed/code-atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113001331886957350'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113001331886957350'/><author><name>William Robertson</name></author></entry><entry><id>tag:blogger.com,1999:blog-18167814.post-113071145142604965</id><published>2005-11-28T22:27:00.000Z</published><updated>2005-11-28T00:43:00.420Z</updated><title type='text'>My sessions</title><content type='html'>A variation of &lt;a href="http://www.williamrobertson.net/code/sessions.sql.txt"&gt;sessions.sql&lt;/a&gt;, but limited to the current OS user account. Handy when there are a lot of sessions and you only want to see your own. I should probably write a generic one that takes parameters...</content><link rel='alternate' type='text/html' href='http://www.williamrobertson.net/feed/2005/11/my-sessions.html' title='My sessions'/><link rel='related' href='http://www.williamrobertson.net/code/my_sessions.sql.txt' title='My sessions'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18167814&amp;postID=113071145142604965' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.williamrobertson.net/feed/code-atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113071145142604965'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113071145142604965'/><author><name>William Robertson</name></author></entry><entry><id>tag:blogger.com,1999:blog-18167814.post-113071122096351195</id><published>2005-11-28T22:23:00.000Z</published><updated>2005-11-28T00:42:15.140Z</updated><title type='text'>Sessions</title><content type='html'>List all database sessions. Handy when you don't have TOAD, PL/SQL Developer etc around.</content><link rel='alternate' type='text/html' href='http://www.williamrobertson.net/feed/2005/11/sessions.html' title='Sessions'/><link rel='related' href='http://www.williamrobertson.net/code/sessions.sql.txt' title='Sessions'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18167814&amp;postID=113071122096351195' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.williamrobertson.net/feed/code-atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113071122096351195'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113071122096351195'/><author><name>William Robertson</name></author></entry><entry><id>tag:blogger.com,1999:blog-18167814.post-113313821887699664</id><published>2005-11-28T00:34:00.000Z</published><updated>2005-12-03T17:40:12.306Z</updated><title type='text'>Dict</title><content type='html'>Find Oracle data dictionary information, grouping the results into USER_/ALL_/DBA_/other. e.g. "@dict dict" finds DICT, DICTIONARY, DICT_COLUMNS, GV$LOGMNR_DICTIONARY and V$LOGMNR_DICTIONARY together with their descriptions.</content><link rel='alternate' type='text/html' href='http://www.williamrobertson.net/feed/2005/11/dict.html' title='Dict'/><link rel='related' href='http://www.williamrobertson.net/code/dict.sql.txt' title='Dict'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18167814&amp;postID=113313821887699664' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.williamrobertson.net/feed/code-atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113313821887699664'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113313821887699664'/><author><name>William Robertson</name></author></entry><entry><id>tag:blogger.com,1999:blog-18167814.post-113313764847632252</id><published>2005-11-28T00:26:00.000Z</published><updated>2005-11-28T00:27:28.476Z</updated><title type='text'>Deps</title><content type='html'>Dependency report for specified object (table, package etc) using DBA_DEPENDENCIES view.</content><link rel='alternate' type='text/html' href='http://www.williamrobertson.net/feed/2005/11/deps.html' title='Deps'/><link rel='related' href='http://www.williamrobertson.net/code/deps.sql.txt' title='Deps'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18167814&amp;postID=113313764847632252' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.williamrobertson.net/feed/code-atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113313764847632252'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113313764847632252'/><author><name>William Robertson</name></author></entry><entry><id>tag:blogger.com,1999:blog-18167814.post-113313748781322420</id><published>2005-11-28T00:21:00.000Z</published><updated>2005-11-28T00:24:47.823Z</updated><title type='text'>Constr</title><content type='html'>Database constraints report, for the specified table, e.g. "@constr emp". Requires three stored types, which are included (commented out) within the script.</content><link rel='alternate' type='text/html' href='http://www.williamrobertson.net/feed/2005/11/constr.html' title='Constr'/><link rel='related' href='http://www.williamrobertson.net/code/constr.sql.txt' title='Constr'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18167814&amp;postID=113313748781322420' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.williamrobertson.net/feed/code-atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113313748781322420'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113313748781322420'/><author><name>William Robertson</name></author></entry><entry><id>tag:blogger.com,1999:blog-18167814.post-113312054558423499</id><published>2005-11-27T19:37:00.000Z</published><updated>2005-11-27T19:42:25.583Z</updated><title type='text'>Cardinality</title><content type='html'>Reports on how unique a column is. For example, 90% of its values might be unique, with the remaining duplicates appearing in groups of twos and threes. This is useful when investigating a system that doesn't have a full set of unique constraints, or just for analyzing data in general. (I've also implemented this as a PL/SQL Developer right-click option using Browser Extender.)</content><link rel='alternate' type='text/html' href='http://www.williamrobertson.net/feed/2005/11/cardinality.html' title='Cardinality'/><link rel='related' href='http://www.williamrobertson.net/code/cardinality.sql.txt' title='Cardinality'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18167814&amp;postID=113312054558423499' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.williamrobertson.net/feed/code-atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113312054558423499'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113312054558423499'/><author><name>William Robertson</name></author></entry><entry><id>tag:blogger.com,1999:blog-18167814.post-113312013602530588</id><published>2005-11-27T19:31:00.000Z</published><updated>2005-11-27T19:35:36.036Z</updated><title type='text'>Count</title><content type='html'>Shows the distinct values of [column] within [table], e.g. "@count object_type all_objects", which is the same as "SELECT object_type, COUNT(*) FROM all_objects GROUP BY object_type", but less typing.</content><link rel='alternate' type='text/html' href='http://www.williamrobertson.net/feed/2005/11/count.html' title='Count'/><link rel='related' href='http://www.williamrobertson.net/code/count.sql.txt' title='Count'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18167814&amp;postID=113312013602530588' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.williamrobertson.net/feed/code-atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113312013602530588'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113312013602530588'/><author><name>William Robertson</name></author></entry><entry><id>tag:blogger.com,1999:blog-18167814.post-113121873142694417</id><published>2005-11-05T19:21:00.000Z</published><updated>2005-11-05T19:25:31.426Z</updated><title type='text'>Most</title><content type='html'>Find the value that occurs most often in a column. For example, "@most object_type all_objects" reports "VIEW" and the number of occurrences; or "@most object_type all_objects 5" to see the top 5 object types.</content><link rel='alternate' type='text/html' href='http://www.williamrobertson.net/feed/2005/11/most.html' title='Most'/><link rel='related' href='http://www.williamrobertson.net/code/most.sql.txt' title='Most'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18167814&amp;postID=113121873142694417' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.williamrobertson.net/feed/code-atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113121873142694417'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113121873142694417'/><author><name>William Robertson</name></author></entry><entry><id>tag:blogger.com,1999:blog-18167814.post-113121831851727969</id><published>2005-11-05T19:14:00.000Z</published><updated>2005-11-05T19:18:38.526Z</updated><title type='text'>Percent</title><content type='html'>Report on the population of [column] within [table]. Shows you how many null values exist in a column.</content><link rel='alternate' type='text/html' href='http://www.williamrobertson.net/feed/2005/11/percent.html' title='Percent'/><link rel='related' href='http://www.williamrobertson.net/code/percent.sql.txt' title='Percent'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18167814&amp;postID=113121831851727969' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.williamrobertson.net/feed/code-atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113121831851727969'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113121831851727969'/><author><name>William Robertson</name></author></entry><entry><id>tag:blogger.com,1999:blog-18167814.post-113001955326023976</id><published>2005-10-22T23:16:00.000+01:00</published><updated>2005-10-22T23:27:38.230+01:00</updated><title type='text'>Biggest</title><content type='html'>Specify a table and a column name, to find the longest value held in that column. Can be useful when analyzing usage patterns or diagnosing "value too large" errors.</content><link rel='alternate' type='text/html' href='http://www.williamrobertson.net/feed/2005/10/biggest.html' title='Biggest'/><link rel='related' href='http://www.williamrobertson.net/code/biggest.sql.txt' title='Biggest'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18167814&amp;postID=113001955326023976' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.williamrobertson.net/feed/code-atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113001955326023976'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18167814/posts/default/113001955326023976'/><author><name>William Robertson</name></author></entry></feed>
