Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle NULL vs '' revisited

Re: Oracle NULL vs '' revisited

From: Tony Rogerson <tonyrogerson_at_torver.net>
Date: Mon, 20 Aug 2007 18:26:01 +0100
Message-ID: <facit8$k4h$1$8300dec7@news.demon.co.uk>


> Please look at TREAT (second link) and explain what you intend. I am
> confused by what appears to be a misunderstanding of what TREAT is and
> does.

I quoted the wrong line.

Your page says this "Change declared type of an expression"

In Oracle you say use TREAT.

In SQL Server, to "Change declared type of an expression" we would use CAST.

So, please change your statement of "no equivalent" to "CAST"

There are so many things wrong on your page is laughable, nor more than attempt by you to diss the product 'period', you've lost all objectivety; in fact, I may use it as a crib sheet to assit people migrating from Oracle to SQL Server - thanks; that will be useful for people.

You say we don't have date arithmetic in one part of your page and then in another you say we do - make your mind up; you say we can't add months - we can, DATEADD deals with milisecond, second, minute, hour, day, month and year.

You say we don't have hierarchical operators - we've implemented the SQL Standard CTE's.

You say we don't have IN-OUT parameters, when we do - see CREATE PROC in bol.

You say we don't have materialised views - we do, "indexed views".

This is all literally in 5 minutes of scanning your page.

This is all in public documentation, books online - check here: http://msdn2.microsoft.com/en-us/library/ms130214.aspx; out of interest, is there an Oracle equivalent where I can view your product documentation without installing/downloading anything? It will just help me to "correct" your diss...

As soon as you correct your document to be factual around trigger usage then I'll help you "correct" your document with examples; I'll do that anyway on my blog - it will be a good source of content (thanks) - can I have your permission to use your original page?

Finally, I'm not aware of a release in 2009, SQL Server 2008 (Katmai) yes, the launch event is spring next year (2008), probably rtm code available mid year - all public info.

-- 
Tony Rogerson, SQL Server MVP
http://sqlblogcasts.com/blogs/tonyrogerson
[Ramblings from the field from a SQL consultant]
http://sqlserverfaq.com
[UK SQL User Community]


"DA Morgan" <damorgan_at_psoug.org> wrote in message 
news:1187628264.58323_at_bubbleator.drizzle.com...

> Tony Rogerson wrote:
>> Great, I'll send stuff over thru the next couple of weeks.
>>
>> Start with these two...
>>
>> "Translate character string using character set"
>>
>> We use CAST which I believe is ANSI standard as well; Oracle uses TREAT
>> which I believe isn't ANSI standard.
>>
>> CAST( <expression> AS <type> )
>
> What? <g>
>
> http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions016.htm#SQLRF00613
> http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions198.htm#SQLRF06148
>
> Please look at TREAT (second link) and explain what you intend. I am
> confused by what appears to be a misunderstanding of what TREAT is and
> does.
>
> Now look at this:
>
> http://msdn2.microsoft.com/en-us/library/ms187928.aspx
>
> CAST in Oracle and CAST in TransactSQL are different in what way? I am
> missing your point.
>
>> "Table Level Triggers"
>> "statement level"
>>
>> I don't believe Oracle has proper statement level triggers, by that I
>> mean the new and old values for ALL rows modified by the statement are
>> available.
>
> You are correct and I would really like to see this dealt with in 11gR2.
>
> But the point of my web page is not that each and every statement, left
> and right, has identical functionality. Were that the intent you
> couldn't equate anything between the products. The point of the page is
> to give students transitioning from one to the other an idea of what to
> look up. Anyone expecting identical functionality with anything more
> complex than SELECT * FROM t is going to be disappointed.
>
> BTW for anyone not following this thread the relevant link is:
> http://www.psoug.org/reference/sqlserver.html
>
>> Row level triggers, we just use a cursor against the "inserted" and/or
>> "deleted" system materialised views.
>
> Every product has workarounds. That isn't the point of my page. I teach
> at the University of Washington just two miles from the main Microsoft
> campus and many of my students, most actually, are experts on SQL Server
> or Sybase. The page is there to help them find rough equivalences.
> Nothing substitutes for reading the docs.
>
>> INSTEAD OF is a before trigger in SQL Server.
>
> Your point being? <g> If you look at my page I indicate that both
> products have instead-of triggers. I don't offer any information other
> than that. It is up to those interested to see in what ways they are
> similar and in what ways they differ.
>
> Be thankful I haven't upgraded the page from 10.2 to 11.1. When I do
> that the disparities with SS2005 grows larger still.
>
> Consider this for example. In a US medical environment with patient data
> HIPAA, federal law, requires that SELECT statements be audited. We have
> been able to do that in Oracle for years. In SQL Server it is still
> impossible. Something that won't be fixed until at least 2009. If I
> tried to put together a page of all differences I would need months just
> to catalog the differences.
>
>> I'll send the rest via email once you have updated the current document
>> to reflect the above.
>
> I really do appreciate it. But please include links. I need to be able
> to read the docs to verify statements. The one place I know I am weak is
> on OLAP functionality so if you know any of that please include it.
> Thanks.
> --
> Daniel A. Morgan
> University of Washington
> damorgan_at_x.washington.edu (replace x with u to respond)
> Puget Sound Oracle Users Group
> www.psoug.org
Received on Mon Aug 20 2007 - 12:26:01 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US