Re: SQL Standard

From: joel garry <joel-garry_at_home.com>
Date: Thu, 22 Apr 2010 09:46:20 -0700 (PDT)
Message-ID: <307e39d7-463c-4d14-b459-347246eb6e08_at_g30g2000prf.googlegroups.com>



On Apr 22, 7:43 am, Mark D Powell <Mark.Powe..._at_hp.com> wrote:
> On Apr 21, 10:52 pm, Mladen Gogala <gogala.mla..._at_gmail.com> wrote:
>
>
>
> > I am reading an old book about SQL standard, "A Guide to SQL Standard",
> > by C.J. Date. On the page 87, the book lists some functions that are part
> > of the SQL standard:
>
> > Connected to:
> > Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit
> > Production
> > With the Partitioning, OLAP, Data Mining and Real Application Testing
> > options
>
> > SQL> select current_user from
> > dual;                                            
> > select current_user from dual
> >        *
> > ERROR at line 1:
> > ORA-00904: "CURRENT_USER": invalid identifier
>
> > Elapsed: 00:00:00.15
> > SQL> select current_time() from
> > dual;                                          
> > select current_time() from dual
> >        *
> > ERROR at line 1:
> > ORA-00904: "CURRENT_TIME": invalid identifier
>
> > Elapsed: 00:00:00.13
> > SQL> select session_user from
> > dual;                                            
> > select session_user from dual
> >        *
> > ERROR at line 1:
> > ORA-00904: "SESSION_USER": invalid identifier
>
> > Elapsed: 00:00:00.13
> > SQL> select session_user() from
> > dual;                                          
> > select session_user() from dual
> >        *
> > ERROR at line 1:
> > ORA-00904: "SESSION_USER": invalid identifier
>
> > Elapsed: 00:00:00.14
> > SQL> show
> > session_user                                                          
> > SP2-0735: unknown SHOW option beginning "session_us..."
> > SQL> select bit_length('ABCD') from
> > dual;                                      
> > select bit_length('ABCD') from dual
> >        *
> > ERROR at line 1:
> > ORA-00904: "BIT_LENGTH": invalid identifier
>
> > Elapsed: 00:00:00.14
> > SQL>
>
> > I know that the vast majority of these functions has well known
> > equivalents in Oracle but I must say that I am curious about the reasons
> > for refusing to go with the standard.

Maybe not enough people have asked for it since 1992?

>
> > --http://mgogala.byethost5.com
>
> I do not have a copy of the actual ANSI and ISO SQL standards handy to
> check but I do know that C J Date often uses his own version of SQL in
> his more recent books and not ANSI standard SQL.

I don't either but http://webstore.ansi.org/RecordDetail.aspx?sku=ANSI+INCITS+135-1992+(R1998) should anyone really care about it. I think the ones Mladen were checking are in the standard, judging from the overwhelming hits on google for searches like ansi standard current_time.

jg

--
_at_home.com is bogus.
http://www.signonsandiego.com/news/2010/apr/22/kevorkian-assisted-suicide-discussed-to-death/
Received on Thu Apr 22 2010 - 11:46:20 CDT

Original text of this message