<?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-20061749</id><updated>2011-09-30T12:56:26.815-07:00</updated><title type='text'>CIO: Counter-intuitive Oracle</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://cedet.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://cedet.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Michael Garfield Sørensen, CeDeT</name><uri>http://www.blogger.com/profile/07507275372538035625</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_im0v1jXMs4A/SgVEp2ApJTI/AAAAAAAAAAY/UtZ_E9I6yz4/S220/LinkedInProfileImage.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>23</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-20061749.post-1000867074960834258</id><published>2010-12-18T10:45:00.000-08:00</published><updated>2010-12-18T11:15:42.721-08:00</updated><title type='text'>Valid or not?</title><content type='html'>I ran into an SQL-statement that was valid in test running Oracle 11.2.0.1 but not valid in production also running Oracle 11.2.0.1!? Since I didn't have access to v$parameter in production it took a while to figure out... Here it is (note how using the ANSI-join syntax indirectly allows a feature that is otherwise not allowed):&lt;br /&gt;&lt;pre&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;SQL&amp;gt; SELECT * FROM v$version;&lt;br /&gt;&lt;br /&gt;BANNER&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production&lt;br /&gt;PL/SQL Release 11.2.0.1.0 - Production&lt;br /&gt;CORE 11.2.0.1.0 Production&lt;br /&gt;TNS for 64-bit Windows: Version 11.2.0.1.0 - Production&lt;br /&gt;NLSRTL Version 11.2.0.1.0 - Production&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; REM Set default value optimizer features enable&lt;br /&gt;SQL&amp;gt; ALTER SESSION SET OPTIMIZER_FEATURES_ENABLE='11.2.0.1';&lt;br /&gt;Session er ændret.&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; DROP TABLE t2 PURGE;&lt;br /&gt;Tabel er droppet.&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; DROP TABLE t1 PURGE;&lt;br /&gt;Tabel er droppet.&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; CREATE TABLE t1(&lt;br /&gt; 2    t1_id INTEGER NOT NULL&lt;br /&gt; 3   ,t1_txt VARCHAR2(20) NOT NULL&lt;br /&gt; 4   ,CONSTRAINT t1_pk&lt;br /&gt; 5      PRIMARY KEY(t1_id)&lt;br /&gt; 6 );&lt;br /&gt;Tabel er oprettet.&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; CREATE TABLE t2(&lt;br /&gt;  2   t2_id INTEGER NOT NULL&lt;br /&gt;  3  ,t1_id INTEGER NOT NULL&lt;br /&gt;  4  ,t2_val NUMBER(2,0) NOT NULL&lt;br /&gt;  5  ,CONSTRAINT t2_pk&lt;br /&gt;  6     PRIMARY KEY(t2_id)&lt;br /&gt;  7  ,CONSTRAINT t2_fk_t1&lt;br /&gt;  8     FOREIGN KEY(t1_id)&lt;br /&gt;  9     REFERENCES t1(t1_id)&lt;br /&gt; 10 );&lt;br /&gt;Tabel er oprettet.&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; INSERT INTO t1 VALUES(1,'Txt1');&lt;br /&gt;1 række er oprettet.&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; INSERT INTO t1 VALUES(2,'Txt2');&lt;br /&gt;1 række er oprettet.&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; INSERT INTO t1 VALUES(3,'Txt3');&lt;br /&gt;1 række er oprettet.&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; INSERT INTO t2 VALUES(1,1,1);&lt;br /&gt;1 række er oprettet.&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; INSERT INTO t2 VALUES(2,2,1);&lt;br /&gt;1 række er oprettet.&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; INSERT INTO t2 VALUES(3,2,2);&lt;br /&gt;1 række er oprettet.&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; INSERT INTO t2 VALUES(4,2,3);&lt;br /&gt;1 række er oprettet.&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; SELECT t1.t1_id,t1.t1_txt,t2.t2_id,t2.t2_val&lt;br /&gt;  2   FROM  t1&lt;br /&gt;  3        ,t2&lt;br /&gt;  4   WHERE t2.t1_id(+)=t1.t1_id&lt;br /&gt;  5   AND   t2.t2_val(+) IN (1,2)&lt;br /&gt;  6 ;&lt;br /&gt;T1_ID      T1_TXT               T2_ID      T2_VAL&lt;br /&gt;---------- -------------------- ---------- ----------&lt;br /&gt;         1 Txt1                          1          1&lt;br /&gt;         2 Txt2                          2          1&lt;br /&gt;         2 Txt2                          3          2&lt;br /&gt;         3 Txt3&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; SELECT t1.t1_id,t1.t1_txt,t2.t2_id,t2.t2_val&lt;br /&gt;  2    FROM t1&lt;br /&gt;  3         LEFT JOIN&lt;br /&gt;  4         t2 ON (t2.t1_id=t1.t1_id AND t2_val IN (1,2))&lt;br /&gt;  5 ;&lt;br /&gt;T1_ID      T1_TXT               T2_ID      T2_VAL&lt;br /&gt;---------- -------------------- ---------- ----------&lt;br /&gt;         1 Txt1                          1          1&lt;br /&gt;         2 Txt2                          2          1&lt;br /&gt;         2 Txt2                          3          2&lt;br /&gt;         3 Txt3&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; ALTER SESSION SET OPTIMIZER_FEATURES_ENABLE='9.2.0';&lt;br /&gt;Session er ændret.&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; REM Same SELECTs as above, but now...&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;SQL&amp;gt; SELECT t1.t1_id,t1.t1_txt,t2.t2_id,t2.t2_val&lt;br /&gt;  2   FROM  t1&lt;br /&gt;  3        ,t2&lt;br /&gt;  4   WHERE t2.t1_id(+)=t1.t1_id&lt;br /&gt;  5   AND   t2.t2_val(+) IN (1,2)&lt;br /&gt;  6 ;&lt;br /&gt;AND t2.t2_val(+) IN (1,2)&lt;br /&gt;*&lt;br /&gt;FEJL i linie 5:&lt;br /&gt;ORA-01719: ydre sammenkædninger (+) er ikke tilladt i operanden for OR- eller&lt;br /&gt;IN-klausuler&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; SELECT t1.t1_id,t1.t1_txt,t2.t2_id,t2.t2_val&lt;br /&gt;  2   FROM  t1&lt;br /&gt;  3         LEFT JOIN&lt;br /&gt;  4         t2 ON (t2.t1_id=t1.t1_id AND t2_val IN (1,2))&lt;br /&gt;  5 ;&lt;br /&gt;T1_ID      T1_TXT               T2_ID      T2_VAL&lt;br /&gt;---------- -------------------- ---------- ----------&lt;br /&gt;         1 Txt1                          1          1&lt;br /&gt;         2 Txt2                          2          1&lt;br /&gt;         2 Txt2                          3          2&lt;br /&gt;         3 Txt3 &lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20061749-1000867074960834258?l=cedet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cedet.blogspot.com/feeds/1000867074960834258/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20061749&amp;postID=1000867074960834258' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/1000867074960834258'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/1000867074960834258'/><link rel='alternate' type='text/html' href='http://cedet.blogspot.com/2010/12/valid-or-not.html' title='Valid or not?'/><author><name>Michael Garfield Sørensen, CeDeT</name><uri>http://www.blogger.com/profile/07507275372538035625</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_im0v1jXMs4A/SgVEp2ApJTI/AAAAAAAAAAY/UtZ_E9I6yz4/S220/LinkedInProfileImage.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20061749.post-8940028874879220251</id><published>2010-10-02T10:05:00.000-07:00</published><updated>2010-10-02T10:10:06.263-07:00</updated><title type='text'>I solemnly DECLARE: NOT NULL</title><content type='html'>An interesting fact about NOT NULL (declarative) constraints, see &lt;a href="http://jonathanlewis.wordpress.com/2010/09/05/not-null/"&gt;Not NULL « Oracle Scratchpad&lt;/a&gt; and &lt;a href="http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:2665514800346181577#2666583500346063752"&gt;Ask Tom "Constraints - Table and Column Level"&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20061749-8940028874879220251?l=cedet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cedet.blogspot.com/feeds/8940028874879220251/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20061749&amp;postID=8940028874879220251' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/8940028874879220251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/8940028874879220251'/><link rel='alternate' type='text/html' href='http://cedet.blogspot.com/2010/10/i-solemnly-declare-not-null.html' title='I solemnly DECLARE: NOT NULL'/><author><name>Michael Garfield Sørensen, CeDeT</name><uri>http://www.blogger.com/profile/07507275372538035625</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_im0v1jXMs4A/SgVEp2ApJTI/AAAAAAAAAAY/UtZ_E9I6yz4/S220/LinkedInProfileImage.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20061749.post-7678311768540306009</id><published>2010-10-02T09:39:00.000-07:00</published><updated>2010-10-02T09:43:05.968-07:00</updated><title type='text'>SQL Data Modeler is now free!</title><content type='html'>See &lt;a href="http://www.oracle.com/technetwork/developer-tools/datamodeler/pricing-faq-101047.html"&gt;Data Modeler Pricing FAQ&lt;/a&gt; (updated September 2010).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20061749-7678311768540306009?l=cedet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cedet.blogspot.com/feeds/7678311768540306009/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20061749&amp;postID=7678311768540306009' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/7678311768540306009'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/7678311768540306009'/><link rel='alternate' type='text/html' href='http://cedet.blogspot.com/2010/10/sql-data-modeler-is-now-free.html' title='SQL Data Modeler is now free!'/><author><name>Michael Garfield Sørensen, CeDeT</name><uri>http://www.blogger.com/profile/07507275372538035625</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_im0v1jXMs4A/SgVEp2ApJTI/AAAAAAAAAAY/UtZ_E9I6yz4/S220/LinkedInProfileImage.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20061749.post-4908181387834647122</id><published>2010-09-05T01:25:00.000-07:00</published><updated>2010-09-05T01:29:09.207-07:00</updated><title type='text'>Tasty? PL/SQL Developer in Wine!</title><content type='html'>Running Oracle XE on your Linux? Missing your favorite PL/SQL GUI tool?? Check out this article &lt;a href="http://darwin-it.blogspot.com/2008/09/plsql-developer-under-wine.html"&gt;PL/SQL DEVELOPER UNDER WINE&lt;/a&gt;!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20061749-4908181387834647122?l=cedet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cedet.blogspot.com/feeds/4908181387834647122/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20061749&amp;postID=4908181387834647122' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/4908181387834647122'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/4908181387834647122'/><link rel='alternate' type='text/html' href='http://cedet.blogspot.com/2010/09/tasty-plsql-developer-in-wine.html' title='Tasty? PL/SQL Developer in Wine!'/><author><name>Michael Garfield Sørensen, CeDeT</name><uri>http://www.blogger.com/profile/07507275372538035625</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_im0v1jXMs4A/SgVEp2ApJTI/AAAAAAAAAAY/UtZ_E9I6yz4/S220/LinkedInProfileImage.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20061749.post-3835836683595767881</id><published>2010-09-03T07:58:00.000-07:00</published><updated>2010-09-03T08:08:27.944-07:00</updated><title type='text'>Give me a FUNCTION that...</title><content type='html'>&lt;pre&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;DECLARE&lt;br /&gt;  i PLS_INTEGER:=0;&lt;br /&gt;  maxlen PLS_INTEGER:=0;&lt;br /&gt;BEGIN&lt;br /&gt;  FOR j IN 1..str.COUNT LOOP&lt;br /&gt;    IF LENGTH(str(j))&gt;maxlen THEN&lt;br /&gt;      maxlen:=LENGTH(str(j));&lt;br /&gt;      i:=j;&lt;br /&gt;    END IF;&lt;br /&gt;  END LOOP;&lt;br /&gt;  RETURN i;&lt;br /&gt;END;&lt;/span&gt;&lt;/pre&gt;Doesn't compile (it's sort of PL/SQL if you wonder). Lacks some details (what's that &lt;code&gt;str&lt;/code&gt; anyway). But you get the picture (it's job interview pseudocode ;o)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20061749-3835836683595767881?l=cedet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cedet.blogspot.com/feeds/3835836683595767881/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20061749&amp;postID=3835836683595767881' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/3835836683595767881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/3835836683595767881'/><link rel='alternate' type='text/html' href='http://cedet.blogspot.com/2010/09/give-me-function-that.html' title='Give me a FUNCTION that...'/><author><name>Michael Garfield Sørensen, CeDeT</name><uri>http://www.blogger.com/profile/07507275372538035625</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_im0v1jXMs4A/SgVEp2ApJTI/AAAAAAAAAAY/UtZ_E9I6yz4/S220/LinkedInProfileImage.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20061749.post-5791022642472256240</id><published>2010-08-08T12:17:00.000-07:00</published><updated>2010-08-08T12:19:20.634-07:00</updated><title type='text'>Indexing Nothing... CONSTANTly</title><content type='html'>&lt;a href="http://richardfoote.wordpress.com/2008/01/23/indexing-nulls-empty-spaces/"&gt;Indexing NULLs (Empty Spaces) « Richard Foote’s Oracle Blog&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20061749-5791022642472256240?l=cedet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cedet.blogspot.com/feeds/5791022642472256240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20061749&amp;postID=5791022642472256240' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/5791022642472256240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/5791022642472256240'/><link rel='alternate' type='text/html' href='http://cedet.blogspot.com/2010/08/indexing-nothing-constantly.html' title='Indexing Nothing... CONSTANTly'/><author><name>Michael Garfield Sørensen, CeDeT</name><uri>http://www.blogger.com/profile/07507275372538035625</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_im0v1jXMs4A/SgVEp2ApJTI/AAAAAAAAAAY/UtZ_E9I6yz4/S220/LinkedInProfileImage.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20061749.post-8745930395437250979</id><published>2009-10-12T12:29:00.001-07:00</published><updated>2009-10-12T12:33:15.990-07:00</updated><title type='text'>Twitter, not Not NOT</title><content type='html'>&lt;a href="http://2.bp.blogspot.com/_im0v1jXMs4A/StOD3VLrjpI/AAAAAAAAAA4/6mGngfw1GFA/s1600-h/twitterNOT.jpg"&gt;&lt;img style="display:inline; margin:0px auto 10px; text-align:left;cursor:pointer; cursor:hand;width: 320px; height: 250px;" src="http://2.bp.blogspot.com/_im0v1jXMs4A/StOD3VLrjpI/AAAAAAAAAA4/6mGngfw1GFA/s320/twitterNOT.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5391798165494795922" /&gt;&lt;/a&gt;&lt;br /&gt;SO SIMPLE and yet SO LOUSY!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20061749-8745930395437250979?l=cedet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cedet.blogspot.com/feeds/8745930395437250979/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20061749&amp;postID=8745930395437250979' title='31 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/8745930395437250979'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/8745930395437250979'/><link rel='alternate' type='text/html' href='http://cedet.blogspot.com/2009/10/twitter-not-not-not.html' title='Twitter, not Not NOT'/><author><name>Michael Garfield Sørensen, CeDeT</name><uri>http://www.blogger.com/profile/07507275372538035625</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_im0v1jXMs4A/SgVEp2ApJTI/AAAAAAAAAAY/UtZ_E9I6yz4/S220/LinkedInProfileImage.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_im0v1jXMs4A/StOD3VLrjpI/AAAAAAAAAA4/6mGngfw1GFA/s72-c/twitterNOT.jpg' height='72' width='72'/><thr:total>31</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20061749.post-3957084841633782268</id><published>2009-10-12T11:22:00.000-07:00</published><updated>2009-10-12T11:24:45.918-07:00</updated><title type='text'>Except NullPointerException?</title><content type='html'>&lt;a href="http://cafe.elharo.com/programming/imagine-theres-no-null/"&gt;The Cafes » Imagine There's No Null&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20061749-3957084841633782268?l=cedet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cedet.blogspot.com/feeds/3957084841633782268/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20061749&amp;postID=3957084841633782268' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/3957084841633782268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/3957084841633782268'/><link rel='alternate' type='text/html' href='http://cedet.blogspot.com/2009/10/except-nullpointerexception.html' title='Except NullPointerException?'/><author><name>Michael Garfield Sørensen, CeDeT</name><uri>http://www.blogger.com/profile/07507275372538035625</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_im0v1jXMs4A/SgVEp2ApJTI/AAAAAAAAAAY/UtZ_E9I6yz4/S220/LinkedInProfileImage.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20061749.post-6134331364674692161</id><published>2009-05-09T01:30:00.000-07:00</published><updated>2009-05-09T01:55:28.984-07:00</updated><title type='text'>Don't always AskTom</title><content type='html'>When trying to reach AskTom from my work PC - it errors out with a PL/SQL error:&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_im0v1jXMs4A/SgU_Yuul4yI/AAAAAAAAAAM/xyTpPMAKDqI/s1600-h/asktomerror.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 310px;" src="http://3.bp.blogspot.com/_im0v1jXMs4A/SgU_Yuul4yI/AAAAAAAAAAM/xyTpPMAKDqI/s320/asktomerror.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5333739027783082786" /&gt;&lt;/a&gt;&lt;br /&gt;... maybe there's a WHEN OTHERS too many in there? Maybe my browser string - HTTP_USER_AGENT - has gotten too long after having installed the latest version of the .NET-framework!?&lt;br /&gt;&lt;br /&gt;&lt;code&gt;HTTP_USER_AGENT=Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 1.1.4322; InfoPath.2; .NET CLR 3.5.21022; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Internet Explorer (8) will do that to you sometimes :o(&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20061749-6134331364674692161?l=cedet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cedet.blogspot.com/feeds/6134331364674692161/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20061749&amp;postID=6134331364674692161' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/6134331364674692161'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/6134331364674692161'/><link rel='alternate' type='text/html' href='http://cedet.blogspot.com/2009/05/dont-always-asktom.html' title='Don&apos;t always AskTom'/><author><name>Michael Garfield Sørensen, CeDeT</name><uri>http://www.blogger.com/profile/07507275372538035625</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_im0v1jXMs4A/SgVEp2ApJTI/AAAAAAAAAAY/UtZ_E9I6yz4/S220/LinkedInProfileImage.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_im0v1jXMs4A/SgU_Yuul4yI/AAAAAAAAAAM/xyTpPMAKDqI/s72-c/asktomerror.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20061749.post-1892307769638598173</id><published>2009-05-09T01:26:00.001-07:00</published><updated>2009-05-09T01:27:58.639-07:00</updated><title type='text'>Foreign NULLs!?</title><content type='html'>Jonathan Lewis has an interesting entry about how foreign keys handle nulls - see &lt;a href="http://jonathanlewis.wordpress.com/2009/05/03/foreign-keys/"&gt;Foreign Keys&lt;/a&gt;!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20061749-1892307769638598173?l=cedet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cedet.blogspot.com/feeds/1892307769638598173/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20061749&amp;postID=1892307769638598173' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/1892307769638598173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/1892307769638598173'/><link rel='alternate' type='text/html' href='http://cedet.blogspot.com/2009/05/foreign-nulls.html' title='Foreign NULLs!?'/><author><name>Michael Garfield Sørensen, CeDeT</name><uri>http://www.blogger.com/profile/07507275372538035625</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_im0v1jXMs4A/SgVEp2ApJTI/AAAAAAAAAAY/UtZ_E9I6yz4/S220/LinkedInProfileImage.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20061749.post-3974288762342063817</id><published>2008-01-17T06:18:00.000-08:00</published><updated>2008-01-17T06:20:40.610-08:00</updated><title type='text'>NULL is not %null%</title><content type='html'>&lt;a href="http://www.sagelogix.com/knowledge/tech-tips/apex_null_handling_lovs"&gt;APEX Null Value Handling in LOVs&lt;/a&gt; (SageLogix Tech Tip).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20061749-3974288762342063817?l=cedet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cedet.blogspot.com/feeds/3974288762342063817/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20061749&amp;postID=3974288762342063817' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/3974288762342063817'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/3974288762342063817'/><link rel='alternate' type='text/html' href='http://cedet.blogspot.com/2008/01/null-is-not-null.html' title='NULL is not %null%'/><author><name>Michael Garfield Sørensen, CeDeT</name><uri>http://www.blogger.com/profile/07507275372538035625</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_im0v1jXMs4A/SgVEp2ApJTI/AAAAAAAAAAY/UtZ_E9I6yz4/S220/LinkedInProfileImage.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20061749.post-7157860633922703665</id><published>2008-01-17T06:07:00.000-08:00</published><updated>2008-01-17T06:17:33.756-08:00</updated><title type='text'>Everything is NOT IN nothing</title><content type='html'>Everything is NOT IN nothing (a.k.a. NULL). See the Oracle Documentation on the &lt;a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/conditions013.htm#sthref2852"&gt;IN Condition&lt;/a&gt; - it says &lt;code&gt;NOT IN&lt;/code&gt; [is] &lt;code&gt;Equivalent to !=ALL. Evaluates to FALSE if any member of the set is NULL.&lt;/code&gt;&lt;pre&gt;&lt;br /&gt;SQL&amp;gt; SELECT 'x' FROM DUAL&lt;br /&gt;  2   WHERE 3 NOT IN (1,2,NULL);&lt;br /&gt;&lt;br /&gt;no rows selected&lt;/pre&gt;&lt;br /&gt;Counter-intuitive or what?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20061749-7157860633922703665?l=cedet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cedet.blogspot.com/feeds/7157860633922703665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20061749&amp;postID=7157860633922703665' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/7157860633922703665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/7157860633922703665'/><link rel='alternate' type='text/html' href='http://cedet.blogspot.com/2008/01/everything-is-not-in-nothing.html' title='Everything is NOT IN nothing'/><author><name>Michael Garfield Sørensen, CeDeT</name><uri>http://www.blogger.com/profile/07507275372538035625</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_im0v1jXMs4A/SgVEp2ApJTI/AAAAAAAAAAY/UtZ_E9I6yz4/S220/LinkedInProfileImage.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20061749.post-5935322742615967703</id><published>2008-01-04T12:36:00.000-08:00</published><updated>2008-01-04T13:00:04.722-08:00</updated><title type='text'>Not so overlapping OVERLAPS!</title><content type='html'>The OVERLAPS operator is counter-intuitive when it comes to the &lt;b&gt;same&lt;/b&gt; date:&lt;br /&gt;&lt;code&gt;SQL&amp;gt; select * from v$version where rownum&amp;lt;2;&lt;br /&gt;&lt;br /&gt;BANNER&lt;br /&gt;----------------------------------------------------------------&lt;br /&gt;Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Prod&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; select 'x' from dual &lt;br /&gt;  2      where (trunc(sysdate),trunc(sysdate)+24)&lt;br /&gt;  3                  overlaps (trunc(sysdate)+24,trunc(sysdate)+42);&lt;br /&gt;&lt;br /&gt;Ingen rækker er valgt&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;But apparently this is according to the standard (see &lt;a href="http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt"&gt;sql1992.txt&lt;/a&gt;) where it says (under "8.11  &amp;lt;overlaps predicate&amp;gt;"):&lt;br /&gt;&lt;code&gt;( S1 &amp;gt; S2 AND NOT ( S1 &amp;gt;= T2 AND T1 &amp;gt;= T2 ) )&lt;br /&gt;OR&lt;br /&gt;( S2 &amp;gt; S1 AND NOT ( S2 &amp;gt;&lt;b&gt;=&lt;/b&gt; T1 AND T2 &amp;gt;= T1 ) )&lt;br /&gt;OR&lt;br /&gt;( S1 = S2 AND ( T1 &amp;lt;&amp;gt; T2 OR T1 = T2 ) )&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Notice the equal in the S2 &amp;gt;= T1 comparison that is negated (i.e. NOT). &lt;b&gt;So be careful out there - know thou standards!&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20061749-5935322742615967703?l=cedet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cedet.blogspot.com/feeds/5935322742615967703/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20061749&amp;postID=5935322742615967703' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/5935322742615967703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/5935322742615967703'/><link rel='alternate' type='text/html' href='http://cedet.blogspot.com/2008/01/not-so-overlapping-overlaps.html' title='Not so overlapping OVERLAPS!'/><author><name>Michael Garfield Sørensen, CeDeT</name><uri>http://www.blogger.com/profile/07507275372538035625</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_im0v1jXMs4A/SgVEp2ApJTI/AAAAAAAAAAY/UtZ_E9I6yz4/S220/LinkedInProfileImage.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20061749.post-116605008427674413</id><published>2006-12-13T14:42:00.000-08:00</published><updated>2006-12-13T14:49:37.776-08:00</updated><title type='text'>Undocumented OVERLAPS</title><content type='html'>&lt;code&gt;SQL*Plus: Release 10.2.0.1.0 - Production on On Dec 13 23:36:15 2006&lt;br /&gt;&lt;br /&gt;Copyright (c) 1982, 2005, Oracle. All rights reserved.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Connected to:&lt;br /&gt;Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production&lt;br /&gt;&lt;br /&gt;SQL&gt; select 'yes' from dual where (sysdate-5,sysdate) overlaps (sysdate-2,sysdate-1);&lt;br /&gt;&lt;br /&gt;'YE&lt;br /&gt;---&lt;br /&gt;yes&lt;br /&gt;&lt;br /&gt;SQL&gt; select 'yes' from dual where (-5,0) overlaps (-2,-1);&lt;br /&gt;select 'yes' from dual where (-5,0) overlaps (-2,-1)&lt;br /&gt;*&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-00932: inconsistent datatypes: expected DATE got NUMBER&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;See &lt;a href="http://www.tek-tips.com/viewthread.cfm?qid=1202052&amp;amp;page=6"&gt;ANSI_SQL - Overlaps&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20061749-116605008427674413?l=cedet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cedet.blogspot.com/feeds/116605008427674413/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20061749&amp;postID=116605008427674413' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/116605008427674413'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/116605008427674413'/><link rel='alternate' type='text/html' href='http://cedet.blogspot.com/2006/12/undocumented-overlaps.html' title='Undocumented OVERLAPS'/><author><name>Michael Garfield Sørensen, CeDeT</name><uri>http://www.blogger.com/profile/07507275372538035625</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_im0v1jXMs4A/SgVEp2ApJTI/AAAAAAAAAAY/UtZ_E9I6yz4/S220/LinkedInProfileImage.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20061749.post-116064037337845939</id><published>2006-10-12T01:01:00.000-07:00</published><updated>2006-10-12T11:37:29.203-07:00</updated><title type='text'>Paying is (not) an option!</title><content type='html'>&lt;span style="font-size:78%;"&gt;(How would you feel about something like the following?)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;ANNOUNCEMENT: The new "Capital of France" version of this Letter is here &lt;b&gt;and it's free&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;This is the all new version of the Letter I wrote some time ago. This new version, rev. 11hR3 (codenamed "Capital of France") has been completely rewritten. The previous version was sold bundled together with some other letters under the name "Letter Suite". This new version of the Letter is FREE. However, please note that some of the words used are specially licensed (as part of one or more speciel add-on options to the core) and must not be read without paying a license fee (in fact some of the words in the sentence you are currently reading may or may not be read without paying) – so please read the license documentation carefully (in fact you should read it before reading this, because some of these words could in fact be in the group of words that you must not read without paying).&lt;br /&gt;&lt;br /&gt;If by now you have read all of the above, please send payment to me (Larry(I'll make you pay for something)-wannabe) for the words that were read that were not free (as outlined in the Licensing Information)…&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;(Inspired by OWB options, see &lt;a href="http://download-uk.oracle.com/docs/cd/B19306_01/license.102/b14199.pdf"&gt;Database Licensing Information 10g Release 2 (10.2)&lt;/a&gt;) &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20061749-116064037337845939?l=cedet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cedet.blogspot.com/feeds/116064037337845939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20061749&amp;postID=116064037337845939' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/116064037337845939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/116064037337845939'/><link rel='alternate' type='text/html' href='http://cedet.blogspot.com/2006/10/paying-is-not-option.html' title='Paying is (not) an option!'/><author><name>Michael Garfield Sørensen, CeDeT</name><uri>http://www.blogger.com/profile/07507275372538035625</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_im0v1jXMs4A/SgVEp2ApJTI/AAAAAAAAAAY/UtZ_E9I6yz4/S220/LinkedInProfileImage.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20061749.post-115100192030984487</id><published>2006-06-22T11:32:00.000-07:00</published><updated>2010-09-18T10:44:58.804-07:00</updated><title type='text'>The empty string IS NULL</title><content type='html'>&lt;code&gt;LENGTH('MGS''X')=LENGTH('MGS')+LENGTH('X')=3+1=4&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;but&lt;br /&gt;&lt;br /&gt;&lt;code&gt;LENGTH('MGS''')=LENGTH('MGS')+0=3+0=3&lt;/code&gt; (which &lt;code&gt;IS NOT NULL&lt;/code&gt;)&lt;br /&gt;vs.&lt;br /&gt;&lt;code&gt;LENGTH('MGS')+LENGTH('')=3+NULL=NULL&lt;/code&gt; (all &lt;code&gt;=&lt;/code&gt; are &lt;code&gt;IS NULL&lt;/code&gt;)&lt;br /&gt;&lt;br /&gt;Counter-intuitive or what?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20061749-115100192030984487?l=cedet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cedet.blogspot.com/feeds/115100192030984487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20061749&amp;postID=115100192030984487' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/115100192030984487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/115100192030984487'/><link rel='alternate' type='text/html' href='http://cedet.blogspot.com/2006/06/empy-string-is-null.html' title='The empty string IS NULL'/><author><name>Michael Garfield Sørensen, CeDeT</name><uri>http://www.blogger.com/profile/07507275372538035625</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_im0v1jXMs4A/SgVEp2ApJTI/AAAAAAAAAAY/UtZ_E9I6yz4/S220/LinkedInProfileImage.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20061749.post-114599762628432720</id><published>2006-04-25T13:35:00.000-07:00</published><updated>2006-04-25T13:42:28.106-07:00</updated><title type='text'>No more FOREIGN KEYS!? (BUG)</title><content type='html'>I do &lt;strong&gt;not&lt;/strong&gt; (want to) believe it:&lt;br /&gt;&lt;pre&gt;SQL*Plus: Release 10.2.0.1.0 - Production on Ti Apr 25 22:31:37 2006&lt;br /&gt;&lt;br /&gt;Copyright (c) 1982, 2005, Oracle.  All rights reserved.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Connected to:&lt;br /&gt;Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production&lt;br /&gt;&lt;br /&gt;SQL&gt; create table t1(c1 number,constraint t1_pk primary key (c1) using&lt;br /&gt;index novalidate);&lt;br /&gt;&lt;br /&gt;Table created.&lt;br /&gt;&lt;br /&gt;SQL&gt; create table t2 (c1 number ,c2 number );&lt;br /&gt;&lt;br /&gt;Table created.&lt;br /&gt;&lt;br /&gt;SQL&gt; alter table t2 add  constraint t2_pk primary key (c1, c2);&lt;br /&gt;&lt;br /&gt;Table altered.&lt;br /&gt;&lt;br /&gt;SQL&gt; alter table t2 add constraint eir_related_event_fk foreign key (c2)&lt;br /&gt;references t1 (c1) ;&lt;br /&gt;&lt;br /&gt;Table altered.&lt;br /&gt;&lt;br /&gt;SQL&gt; select eir.c2 from t2 eir join t1 e on eir.c2 = e.c1;&lt;br /&gt;select eir.c2 from t2 eir join t1 e on eir.c2 = e.c1&lt;br /&gt;*&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-03113: end-of-file on communication channel&lt;/pre&gt;Straight from &lt;a href="http://metalink.oracle.com/"&gt;MetaLink&lt;/a&gt; - Bug No. 5126551.&lt;br /&gt;&lt;br /&gt;Maybe we should just stop using FOREIGN KEY constraints!?!?!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20061749-114599762628432720?l=cedet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cedet.blogspot.com/feeds/114599762628432720/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20061749&amp;postID=114599762628432720' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/114599762628432720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/114599762628432720'/><link rel='alternate' type='text/html' href='http://cedet.blogspot.com/2006/04/no-more-foreign-keys-bug.html' title='No more FOREIGN KEYS!? (BUG)'/><author><name>Michael Garfield Sørensen, CeDeT</name><uri>http://www.blogger.com/profile/07507275372538035625</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_im0v1jXMs4A/SgVEp2ApJTI/AAAAAAAAAAY/UtZ_E9I6yz4/S220/LinkedInProfileImage.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20061749.post-114556436088093260</id><published>2006-04-20T13:10:00.000-07:00</published><updated>2006-04-22T00:18:00.683-07:00</updated><title type='text'>Equal or NULL (that IS the question)</title><content type='html'>Yesterday I recalled these lyrics:&lt;br /&gt;&lt;blockquote&gt;&lt;em&gt;...&lt;/em&gt;&lt;br /&gt;&lt;em&gt;and everything under the Sun is in tune&lt;/em&gt;&lt;br /&gt;&lt;em&gt;but the Sun is eclipsed by the Moon&lt;/em&gt;&lt;br /&gt;[Pink Floyd: Eclipse (Dark Side of the Moon)]&lt;br /&gt;&lt;a href="http://www.amazon.co.uk/exec/obidos/ASIN/B000024D4P/wwwgarfieldk"&gt;&lt;img alt="Pink Floyd: Dark Side of the Moon - Buy it at amazon.co.uk" src="http://images-eu.amazon.com/images/P/B000024D4P.02._OU02_PIuk-r-fp-899,BottomRight,10,10_SCMZZZZZZZ_.jpg" align="center" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-size:-2;"&gt;In association with amazon.co.uk&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;And it made me think:&lt;br /&gt;&lt;blockquote&gt;&lt;a href="http://en.wikipedia.org/wiki/Ceteris_paribus"&gt;&lt;em&gt;all other things being equal&lt;/em&gt;&lt;/a&gt;&lt;br /&gt;&lt;em&gt;but nothing IS equal to NULL&lt;/em&gt;&lt;br /&gt;[Dark Side of (ANSI) SQL]&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20061749-114556436088093260?l=cedet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cedet.blogspot.com/feeds/114556436088093260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20061749&amp;postID=114556436088093260' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/114556436088093260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/114556436088093260'/><link rel='alternate' type='text/html' href='http://cedet.blogspot.com/2006/04/equal-or-null-that-is-question.html' title='Equal or NULL (that IS the question)'/><author><name>Michael Garfield Sørensen, CeDeT</name><uri>http://www.blogger.com/profile/07507275372538035625</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_im0v1jXMs4A/SgVEp2ApJTI/AAAAAAAAAAY/UtZ_E9I6yz4/S220/LinkedInProfileImage.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20061749.post-114556108079895855</id><published>2006-04-20T11:57:00.000-07:00</published><updated>2006-10-10T12:42:25.530-07:00</updated><title type='text'>How many rows are there?</title><content type='html'>How many rows should the following query return?&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;select level as l&lt;br /&gt; from  dual&lt;br /&gt; connect by level&lt;=742&lt;/pre&gt;&lt;br /&gt;SQL*Plus may tell you &lt;strong&gt;1&lt;/strong&gt; (one row): &lt;p&gt;&lt;a href="http://photos1.blogger.com/blogger/3386/1998/1600/sqlpsel.gif"&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://photos1.blogger.com/blogger/3386/1998/320/sqlpsel.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;TOAD may tell you &lt;strong&gt;500&lt;/strong&gt; (more or exactly):&lt;br /&gt;&lt;a href="http://photos1.blogger.com/blogger/3386/1998/1600/toad.0.gif"&gt;&lt;/a&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://photos1.blogger.com/blogger/3386/1998/320/toad.0.png" border="0" /&gt; &lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://photos1.blogger.com/blogger/3386/1998/320/toadsel1.png" border="0" /&gt; &lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://photos1.blogger.com/blogger/3386/1998/320/toadsel2.png" border="0" /&gt;&lt;br /&gt;SQL Developer may tell you &lt;strong&gt;10&lt;/strong&gt;:&lt;br /&gt;&lt;a href="http://photos1.blogger.com/blogger/3386/1998/1600/sqld.gif"&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://photos1.blogger.com/blogger/3386/1998/320/sqld.jpg" border="0" /&gt;&lt;/a&gt; &lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://photos1.blogger.com/blogger/3386/1998/320/sqldsel.png" border="0" /&gt;&lt;br /&gt;Maybe they should all start counting:&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;select count(*) from (&lt;br /&gt;select level as l&lt;br /&gt; from  dual&lt;br /&gt; connect by level&lt;=742)&lt;/pre&gt;&lt;br /&gt;... and they all answer &lt;strong&gt;742&lt;/strong&gt;!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20061749-114556108079895855?l=cedet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cedet.blogspot.com/feeds/114556108079895855/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20061749&amp;postID=114556108079895855' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/114556108079895855'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/114556108079895855'/><link rel='alternate' type='text/html' href='http://cedet.blogspot.com/2006/04/how-many-rows-are-there.html' title='How many rows are there?'/><author><name>Michael Garfield Sørensen, CeDeT</name><uri>http://www.blogger.com/profile/07507275372538035625</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_im0v1jXMs4A/SgVEp2ApJTI/AAAAAAAAAAY/UtZ_E9I6yz4/S220/LinkedInProfileImage.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20061749.post-113822265542807240</id><published>2006-01-25T12:52:00.000-08:00</published><updated>2006-01-25T12:57:35.440-08:00</updated><title type='text'>More of nothing...</title><content type='html'>Nothing is and has always been a very hot topic - see previous posting, see &lt;a href="http://wedonotuse.blogspot.com/2005/11/max-value-of-null.html"&gt;The max value of Null&lt;/a&gt; and see &lt;a href="http://tkyte.blogspot.com/2006/01/something-about-nothing.html"&gt;Something about nothing...&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20061749-113822265542807240?l=cedet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cedet.blogspot.com/feeds/113822265542807240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20061749&amp;postID=113822265542807240' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/113822265542807240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/113822265542807240'/><link rel='alternate' type='text/html' href='http://cedet.blogspot.com/2006/01/more-of-nothing.html' title='More of nothing...'/><author><name>Michael Garfield Sørensen, CeDeT</name><uri>http://www.blogger.com/profile/07507275372538035625</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_im0v1jXMs4A/SgVEp2ApJTI/AAAAAAAAAAY/UtZ_E9I6yz4/S220/LinkedInProfileImage.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20061749.post-113761654845602425</id><published>2006-01-18T12:23:00.000-08:00</published><updated>2006-01-18T12:35:48.470-08:00</updated><title type='text'>NULLs and 3VL!</title><content type='html'>Missing values (i.e. &lt;code&gt;NULL&lt;/code&gt;s) impact on SQL is maybe one of the biggest &lt;a href="http://en.wikipedia.org/wiki/Gotcha"&gt;gotcha&lt;/a&gt;s in the field of relational databases and Oracle is no exception: &lt;a href="http://www.cedet.dk/oracle/oif/nonulls.html"&gt;Three-valued logic comes from Nothing (and gets you nowhere)&lt;/a&gt; and it creeps in everywhere - just to name one sighting see &lt;a href="http://www.cedet.dk/oracle/edw/owb.html#WBTRUNC"&gt;= null in WB_TRUNCATE_TABLE&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20061749-113761654845602425?l=cedet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cedet.blogspot.com/feeds/113761654845602425/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20061749&amp;postID=113761654845602425' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/113761654845602425'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/113761654845602425'/><link rel='alternate' type='text/html' href='http://cedet.blogspot.com/2006/01/nulls-and-3vl.html' title='NULLs and 3VL!'/><author><name>Michael Garfield Sørensen, CeDeT</name><uri>http://www.blogger.com/profile/07507275372538035625</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_im0v1jXMs4A/SgVEp2ApJTI/AAAAAAAAAAY/UtZ_E9I6yz4/S220/LinkedInProfileImage.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20061749.post-113753602125014808</id><published>2006-01-17T13:58:00.000-08:00</published><updated>2006-01-17T14:19:59.106-08:00</updated><title type='text'>WHENEVER OSERROR EXIT what?</title><content type='html'>The SQL*Plus User's Guide and Reference, Release 9.2 on &lt;a href="http://download-west.oracle.com/docs/cd/B10501_01/server.920/a90842/ch13.htm#1014654"&gt;WHENEVER OSERROR command&lt;/a&gt; does not mention &lt;code&gt;OSCODE&lt;/code&gt; as a possible (system) variable to be used as exit code (just as &lt;code&gt;SQL.SQLCODE&lt;/code&gt; is for &lt;code&gt;WHENEVER SQLERROR EXIT&lt;/code&gt;) - however this is suggested by SQL*Plus when issuing just &lt;code&gt;WHENEVER OSERROR;&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;So which is right (the manual or SQL*Plus) - &lt;a href="http://www.CeDeT.dk/oracle/oif/whenever_oserror.html"&gt;I cannot tell&lt;/a&gt; (&lt;a href="http://www.CeDeT.dk/oracle/oif"&gt;Oracle is funny (that way)&lt;/a&gt;).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20061749-113753602125014808?l=cedet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cedet.blogspot.com/feeds/113753602125014808/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20061749&amp;postID=113753602125014808' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/113753602125014808'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/113753602125014808'/><link rel='alternate' type='text/html' href='http://cedet.blogspot.com/2006/01/whenever-oserror-exit-what.html' title='WHENEVER OSERROR EXIT what?'/><author><name>Michael Garfield Sørensen, CeDeT</name><uri>http://www.blogger.com/profile/07507275372538035625</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_im0v1jXMs4A/SgVEp2ApJTI/AAAAAAAAAAY/UtZ_E9I6yz4/S220/LinkedInProfileImage.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20061749.post-113516022901263535</id><published>2005-12-21T02:09:00.000-08:00</published><updated>2005-12-21T02:22:45.523-08:00</updated><title type='text'>Counter-intuitive Oracle...</title><content type='html'>&lt;p&gt;Three links to get this BLOG started:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.oracle.com/"&gt;Oracle Corporation&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Counter-intuitive"&gt;Counter-intuitive - Wikipedia, the free encyclopedia&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.CeDeT.dk/"&gt;CeDeT: Oracle udvikling og design, programmering&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Welcome...&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20061749-113516022901263535?l=cedet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cedet.blogspot.com/feeds/113516022901263535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20061749&amp;postID=113516022901263535' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/113516022901263535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20061749/posts/default/113516022901263535'/><link rel='alternate' type='text/html' href='http://cedet.blogspot.com/2005/12/counter-intuitive-oracle.html' title='Counter-intuitive Oracle...'/><author><name>Michael Garfield Sørensen, CeDeT</name><uri>http://www.blogger.com/profile/07507275372538035625</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_im0v1jXMs4A/SgVEp2ApJTI/AAAAAAAAAAY/UtZ_E9I6yz4/S220/LinkedInProfileImage.jpg'/></author><thr:total>0</thr:total></entry></feed>
