That worked perfectly, thank you so much for your help!
On Tuesday, October 1, 2019 at 3:35:25 PM UTC+2, Mike Bayer wrote:
>
> Hi there -
>
> you can use sqlalchemy.dialects.oracle.NUMBER directly:
>
> from sqlalchemy import Column
> from sqlalchemy import MetaData
> from sqlalchemy import Table
> from sqlalchemy.dialects import oracle
> from sqlalchemy.dialects.oracle import NUMBER
> from sqlalchemy.schema import CreateTable
>
>
> t = Table('t', MetaData(), Column('x', NUMBER()))
>
> print(CreateTable(t).compile(dialect=oracle.dialect()))
>
>
> CREATE TABLE t (
> x NUMBER
> )
>
>
>
>
>
> On Tue, Oct 1, 2019, at 9:28 AM, jr wrote:
>
>
> When the sqlalchemy Numeric type is used with default parameters, in an
> Oracle DB this generates the NUMBER type with empty precision but scale set
> to zero, which has the effect that only integer values can be saved.
>
>
>
> My goal is to use the Oracle NUMBER type with empty scale in order to save
> decimal values with 'arbitrary' scale.
>
>
>
> Which sqlalchemy column type do I have to use in order to generate an
> Oracle NUMBER type without precision and scale?
>
>
> Thanks!
>
>
> --
> SQLAlchemy -
> The Python SQL Toolkit and Object Relational Mapper
>
> http://www.sqlalchemy.org/
>
> To post example code, please provide an MCVE: Minimal, Complete, and
> Verifiable Example. See http://stackoverflow.com/help/mcve for a full
> description.
> ---
> You received this message because you are subscribed to the Google Groups
> "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected] <javascript:>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sqlalchemy/3b12c62c-f560-4346-ab67-cff39258c9d9%40googlegroups.com
>
> <https://groups.google.com/d/msgid/sqlalchemy/3b12c62c-f560-4346-ab67-cff39258c9d9%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http://stackoverflow.com/help/mcve for a full description.
---
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sqlalchemy/634183d7-a9b2-4d10-9555-74166bc238ce%40googlegroups.com.