You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ddlutils-dev@db.apache.org by "Richard Bounds (JIRA)" <ji...@apache.org> on 2005/09/30 14:35:47 UTC
[jira] Created: (DDLUTILS-20) Oracle FLOAT and DOUBLE type mappings have zero scale
Oracle FLOAT and DOUBLE type mappings have zero scale
-----------------------------------------------------
Key: DDLUTILS-20
URL: http://issues.apache.org/jira/browse/DDLUTILS-20
Project: DdlUtils
Type: Bug
Reporter: Richard Bounds
Assigned to: Thomas Dudziak
In Oracle8Platform, the types FLOAT and DOUBLE are mapped to NUMBER(38). According to Oracle's docs, this type has zero scale. It looks like floating point numbers should be specified either as just NUMBER or FLOAT(n). See:
http://oraclelon1.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm#g196646
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (DDLUTILS-20) Oracle FLOAT and DOUBLE type mappings have zero scale
Posted by "Richard Bounds (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/DDLUTILS-20?page=comments#action_12330958 ]
Richard Bounds commented on DDLUTILS-20:
----------------------------------------
I think the problem is that when you specify a precision without a scale, it implicitly specifies a scale of 0 (e.g. look at the top 2 rows in the table).
When I try this on my Oracle 10g database:
CREATE TABLE testnumber
(
num NUMBER(38)
);
insert into testnumber values(1.5);
select num from testnumber;
I get back '2', not '1.5'. When I specify the type as:
CREATE TABLE testnumber
(
num NUMBER
);
I get back the correct value. Unfortunately I haven't got an Oracle 8 database to try it on.
> Oracle FLOAT and DOUBLE type mappings have zero scale
> -----------------------------------------------------
>
> Key: DDLUTILS-20
> URL: http://issues.apache.org/jira/browse/DDLUTILS-20
> Project: DdlUtils
> Type: Bug
> Reporter: Richard Bounds
> Assignee: Thomas Dudziak
>
> In Oracle8Platform, the types FLOAT and DOUBLE are mapped to NUMBER(38). According to Oracle's docs, this type has zero scale. It looks like floating point numbers should be specified either as just NUMBER or FLOAT(n). See:
> http://oraclelon1.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm#g196646
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (DDLUTILS-20) Oracle FLOAT and DOUBLE type mappings
have zero scale
Posted by "Thomas Dudziak (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/DDLUTILS-20?page=all ]
Thomas Dudziak updated DDLUTILS-20:
-----------------------------------
Component: Core - Oracle
> Oracle FLOAT and DOUBLE type mappings have zero scale
> -----------------------------------------------------
>
> Key: DDLUTILS-20
> URL: http://issues.apache.org/jira/browse/DDLUTILS-20
> Project: DdlUtils
> Type: Bug
> Components: Core - Oracle
> Reporter: Richard Bounds
> Assignee: Thomas Dudziak
> Fix For: 1.0
> Attachments: metadata.xml
>
> In Oracle8Platform, the types FLOAT and DOUBLE are mapped to NUMBER(38). According to Oracle's docs, this type has zero scale. It looks like floating point numbers should be specified either as just NUMBER or FLOAT(n). See:
> http://oraclelon1.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm#g196646
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (DDLUTILS-20) Oracle FLOAT and DOUBLE type mappings have zero scale
Posted by "Richard Bounds (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/DDLUTILS-20?page=all ]
Richard Bounds updated DDLUTILS-20:
-----------------------------------
Attachment: metadata.xml
Hopefully this is what you wanted...
> Oracle FLOAT and DOUBLE type mappings have zero scale
> -----------------------------------------------------
>
> Key: DDLUTILS-20
> URL: http://issues.apache.org/jira/browse/DDLUTILS-20
> Project: DdlUtils
> Type: Bug
> Reporter: Richard Bounds
> Assignee: Thomas Dudziak
> Attachments: metadata.xml
>
> In Oracle8Platform, the types FLOAT and DOUBLE are mapped to NUMBER(38). According to Oracle's docs, this type has zero scale. It looks like floating point numbers should be specified either as just NUMBER or FLOAT(n). See:
> http://oraclelon1.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm#g196646
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Resolved: (DDLUTILS-20) Oracle FLOAT and DOUBLE type
mappings have zero scale
Posted by "Thomas Dudziak (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/DDLUTILS-20?page=all ]
Thomas Dudziak resolved DDLUTILS-20.
------------------------------------
Resolution: Fixed
DdlUtils now uses DOUBLE PRECISION, FLOAT and REAL respectively for these types as these are available at least in Oracle 8 and newer.
> Oracle FLOAT and DOUBLE type mappings have zero scale
> -----------------------------------------------------
>
> Key: DDLUTILS-20
> URL: http://issues.apache.org/jira/browse/DDLUTILS-20
> Project: DdlUtils
> Issue Type: Bug
> Components: Core - Oracle
> Reporter: Richard Bounds
> Assigned To: Thomas Dudziak
> Fix For: 1.0
>
> Attachments: metadata.xml
>
>
> In Oracle8Platform, the types FLOAT and DOUBLE are mapped to NUMBER(38). According to Oracle's docs, this type has zero scale. It looks like floating point numbers should be specified either as just NUMBER or FLOAT(n). See:
> http://oraclelon1.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm#g196646
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (DDLUTILS-20) Oracle FLOAT and DOUBLE type mappings
have zero scale
Posted by "Thomas Dudziak (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/DDLUTILS-20?page=all ]
Thomas Dudziak updated DDLUTILS-20:
-----------------------------------
Fix Version: 1.0
> Oracle FLOAT and DOUBLE type mappings have zero scale
> -----------------------------------------------------
>
> Key: DDLUTILS-20
> URL: http://issues.apache.org/jira/browse/DDLUTILS-20
> Project: DdlUtils
> Type: Bug
> Reporter: Richard Bounds
> Assignee: Thomas Dudziak
> Fix For: 1.0
> Attachments: metadata.xml
>
> In Oracle8Platform, the types FLOAT and DOUBLE are mapped to NUMBER(38). According to Oracle's docs, this type has zero scale. It looks like floating point numbers should be specified either as just NUMBER or FLOAT(n). See:
> http://oraclelon1.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm#g196646
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (DDLUTILS-20) Oracle FLOAT and DOUBLE type mappings have zero scale
Posted by "Thomas Dudziak (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/DDLUTILS-20?page=comments#action_12330959 ]
Thomas Dudziak commented on DDLUTILS-20:
----------------------------------------
Hmm, could you run the DumpMetadataTask like so:
<taskdef name="dumpMetadata"
classname="org.apache.ddlutils.task.DumpMetadataTask ">
<classpath refid="runtime-classpath"/>
</taskdef>
<dumpMetadata outputfile="metadata.xml">
<database url="jdbc:derby:ddlutils"
driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
username=""
password=""/>
</dumpMetadata >
on an Oracle database that you created with the FLOAT datatype ? I'd like to see what Oracle makes of this, eg. whether it converts it to some other datatype or uses FLOAT directly.
If it is the latter, I could introduce a new Oracle 10 platform (until I can test an Oracle 8 installation) that uses ANSI types.
> Oracle FLOAT and DOUBLE type mappings have zero scale
> -----------------------------------------------------
>
> Key: DDLUTILS-20
> URL: http://issues.apache.org/jira/browse/DDLUTILS-20
> Project: DdlUtils
> Type: Bug
> Reporter: Richard Bounds
> Assignee: Thomas Dudziak
>
> In Oracle8Platform, the types FLOAT and DOUBLE are mapped to NUMBER(38). According to Oracle's docs, this type has zero scale. It looks like floating point numbers should be specified either as just NUMBER or FLOAT(n). See:
> http://oraclelon1.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm#g196646
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (DDLUTILS-20) Oracle FLOAT and DOUBLE type mappings have zero scale
Posted by "Thomas Dudziak (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/DDLUTILS-20?page=comments#action_12330957 ]
Thomas Dudziak commented on DDLUTILS-20:
----------------------------------------
Actually, this is not the case. If you read the paragraph "Floating-Point Numbers" below the table then you'll see that the scale parameter is not applicable to floating point numbers. As per Oracle 8.1.7 spec, page 2-11:
"NUMBER is a floating-point number with decimal precision 38. Note that a scale value is not applicable for floating-point numbers."
I refrained from using the ANSI datatypes until I have a Oracle 8 database to test against (is in the works).
> Oracle FLOAT and DOUBLE type mappings have zero scale
> -----------------------------------------------------
>
> Key: DDLUTILS-20
> URL: http://issues.apache.org/jira/browse/DDLUTILS-20
> Project: DdlUtils
> Type: Bug
> Reporter: Richard Bounds
> Assignee: Thomas Dudziak
>
> In Oracle8Platform, the types FLOAT and DOUBLE are mapped to NUMBER(38). According to Oracle's docs, this type has zero scale. It looks like floating point numbers should be specified either as just NUMBER or FLOAT(n). See:
> http://oraclelon1.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm#g196646
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira