Subject | Differences in SQL Dialects |
---|---|
Author | David Schnepper |
Post date | 2000-05-30T16:50:57Z |
This summarizes the differences in SQL Dialects
SQL Item Dialect 3 Dialect 2 Dialect 1
------------------------------------------------------------
DATE Date only ERROR Message Date & Time (Timestamp)
TIMESTAMP Timestamp Timestamp Timestamp
TIME Time only Error message? Error message
"quoted" Symbol ERROR Message String
1 / 3 0 (exact) 0 0.3333333... (double
precision)
(with warning?)
NUMERIC(11,*) 64 bit int 64 bit int double precision
(with warning?)
(there are similar data type changes for other arithmetic operators,
e.g.: <long> + <long> is an <int64> instead of a <double>)
To answer Helen's question:
Yes, in IB 6, Dialect 3, DATE means "Date only, no time".
A way to think about dialects:
Dialect 1 -- Behave as close as possible to v5.x
Dialect 2 -- Flag out any differences as errors, warnings, etc.
Dialect 3 -- Newly supported SQL syntax & semantics (closer to the spec)
In the future, I can see additional dialects being supported as IB migrates
to be closer to the spec (or anytime a semantic difference is made in
IB's SQL support). For instance, in Dialect 3
<Timestamp> - <Timestamp> returns a double (representing # of days
difference).
SQL specifies a new datatype INTERVAL is the result of this expression.
When (or if) INTERVAL is supported, a new dialect (4) would be needed to
flag
the datatype difference in this type of expression and another one (5) to
have the result be INTERVAL instead of <double>.
Dave
-----Original Message-----
From: Helen Borrie [mailto:helebor@...]
Sent: Tuesday, May 30, 2000 8:21 AM
To: IBDI@egroups.com
Subject: RE: [IBDI] Iertbase 6 + paradox + Data pump...
At 06:47 AM 30-05-00 -0700, you wrote:
says DATE is still supported. Is this a documentation bug, or has DATE
changed to be 'date only' (i.e. no time incorporated now)?
Helen
http://www.interbase2000.org
___________________________________________________
"Ask not what your free, open-source database can do for you,
but what you can do for your free, open-source database."
(J.F.K.)
------------------------------------------------------------------------
Was the salesman clueless? Productopia has the answers.
http://click.egroups.com/1/4633/4/_/679568/_/959700348/
------------------------------------------------------------------------
Community email addresses:
Post message: IBDI@onelist.com
Subscribe: IBDI-subscribe@onelist.com
Unsubscribe: IBDI-unsubscribe@onelist.com
List owner: IBDI-owner@onelist.com
Shortcut URL to this page:
http://www.onelist.com/community/IBDI
SQL Item Dialect 3 Dialect 2 Dialect 1
------------------------------------------------------------
DATE Date only ERROR Message Date & Time (Timestamp)
TIMESTAMP Timestamp Timestamp Timestamp
TIME Time only Error message? Error message
"quoted" Symbol ERROR Message String
1 / 3 0 (exact) 0 0.3333333... (double
precision)
(with warning?)
NUMERIC(11,*) 64 bit int 64 bit int double precision
(with warning?)
(there are similar data type changes for other arithmetic operators,
e.g.: <long> + <long> is an <int64> instead of a <double>)
To answer Helen's question:
Yes, in IB 6, Dialect 3, DATE means "Date only, no time".
A way to think about dialects:
Dialect 1 -- Behave as close as possible to v5.x
Dialect 2 -- Flag out any differences as errors, warnings, etc.
Dialect 3 -- Newly supported SQL syntax & semantics (closer to the spec)
In the future, I can see additional dialects being supported as IB migrates
to be closer to the spec (or anytime a semantic difference is made in
IB's SQL support). For instance, in Dialect 3
<Timestamp> - <Timestamp> returns a double (representing # of days
difference).
SQL specifies a new datatype INTERVAL is the result of this expression.
When (or if) INTERVAL is supported, a new dialect (4) would be needed to
flag
the datatype difference in this type of expression and another one (5) to
have the result be INTERVAL instead of <double>.
Dave
-----Original Message-----
From: Helen Borrie [mailto:helebor@...]
Sent: Tuesday, May 30, 2000 8:21 AM
To: IBDI@egroups.com
Subject: RE: [IBDI] Iertbase 6 + paradox + Data pump...
At 06:47 AM 30-05-00 -0700, you wrote:
>It looks like the problem is pretty simple. Your database is defined asI pondered this DATE thing, too, and checked the IB 6 documentation. It
>SQL dialect 3 -- and you are defining a "DATE" column. The message you
>get is the one that means "there is a conflict in the understanding of sql
>between dialect 1 and dialect 3" in something you've used.
>
>Your options are
>- Recreate the database as a dialect 1 database.
>- Use SQL dialect 3 exclusively (which may not be possible if you're using
>BDE)
>- Use TIMESTAMP instead of DATE (which you'ld have to do in sql dialect 3
>anyway).
>
>Hope this helps
>
>Dave
says DATE is still supported. Is this a documentation bug, or has DATE
changed to be 'date only' (i.e. no time incorporated now)?
Helen
http://www.interbase2000.org
___________________________________________________
"Ask not what your free, open-source database can do for you,
but what you can do for your free, open-source database."
(J.F.K.)
------------------------------------------------------------------------
Was the salesman clueless? Productopia has the answers.
http://click.egroups.com/1/4633/4/_/679568/_/959700348/
------------------------------------------------------------------------
Community email addresses:
Post message: IBDI@onelist.com
Subscribe: IBDI-subscribe@onelist.com
Unsubscribe: IBDI-unsubscribe@onelist.com
List owner: IBDI-owner@onelist.com
Shortcut URL to this page:
http://www.onelist.com/community/IBDI