Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Datenbanken (https://www.delphipraxis.net/15-datenbanken/)
-   -   Delphi SQL Server -> SQLBase (https://www.delphipraxis.net/42600-sql-server-sqlbase.html)

alcaeus 21. Mär 2005 14:42

Datenbank: SQL Server / Centura • Version: 2000 / 7.5.1 • Zugriff über: n/a

SQL Server -> SQLBase
 
Hallo allerseits,

ich muss ein paar Tabellen von MSSQL nach Centura SQLBase portieren, habe aber Probleme mit zwei Scripts:

Aus dem hier:
SQL-Code:
CREATE TABLE DBA.pvlpe(
    lpe_num_pe          smallint NOT NULL PRIMARY KEY,
    lpe_peso            numeric(16, 4),
    lpe_prog_fisc       char(20)
)
GO
wurde das:
SQL-Code:
CREATE TABLE pvlpe(
    lpe_num_pe          smallint NOT NULL,
    lpe_peso            decimal(16, 4),
    lpe_prog_fisc       char(20),
    PRIMARY KEY (lpe_num_pe)
);

create unique index pvlpe_pk on pvlpe (lpe_num_pe asc);
Allerdings protestiert hier SQLBase und wirft mir ein "Invalid decimal precision" an den Kopf :wall:

Und bei dem hier:
SQL-Code:
CREATE TABLE DBA.pvscd(
    scm_num_pe          smallint NOT NULL REFERENCES DBA.pvscm(scm_num_pe),
    scd_prog            smallint NOT NULL,
    scd_rif_cod         char(13),
    scd_cer             char(6),
    scd_rif_des         char(90),
    scd_cod_pr          char(6),
    scd_uni_pr          smallint,
    scd_ragsoc_pr       char(40),
    scd_num_fi          char(20)
)
GO

ALTER TABLE DBA.pvscd ADD PRIMARY KEY (scm_num_pe, scd_prog)
GO
weiß ich nicht so recht, wie das REFERENCES in SQLBase geht :oops:

Kann mir irgendjemand weiterhelfen?

Greetz
alcaeus

Stevie 21. Mär 2005 17:28

Re: SQL Server -> SQLBase
 
Zitat:

Zitat von alcaeus
Allerdings protestiert hier SQLBase und wirft mir ein "Invalid decimal precision" an den Kopf :wall:

Vermutung: Kann es sein, dass der Datentyp decimal nicht 16 Stellen verkraftet? Imho gibt es bei einigen DBs und bestimmten Datentypen eine Beschränkung auf 15 Stellen.

Zitat:

Zitat von alcaeus
Und bei dem hier:
SQL-Code:
CREATE TABLE DBA.pvscd(
    scm_num_pe          smallint NOT NULL REFERENCES DBA.pvscm(scm_num_pe),
    scd_prog            smallint NOT NULL,
    scd_rif_cod         char(13),
    scd_cer             char(6),
    scd_rif_des         char(90),
    scd_cod_pr          char(6),
    scd_uni_pr          smallint,
    scd_ragsoc_pr       char(40),
    scd_num_fi          char(20)
)
GO

ALTER TABLE DBA.pvscd ADD PRIMARY KEY (scm_num_pe, scd_prog)
GO
weiß ich nicht so recht, wie das REFERENCES in SQLBase geht :oops:

SQL-Code:
CREATE TABLE DBA.pvscd( 
    scm_num_pe          smallint NOT NULL,
    scd_prog            smallint NOT NULL,
    scd_rif_cod         char(13),
    scd_cer             char(6),
    scd_rif_des         char(90),
    scd_cod_pr          char(6),
    scd_uni_pr          smallint,
    scd_ragsoc_pr       char(40),
    scd_num_fi          char(20),
    FOREIGN KEY (scm_num_pe) REFRENCES DBA.pvscm(scm_num_pe)
)
GO

alcaeus 22. Mär 2005 06:03

Re: SQL Server -> SQLBase
 
Hui...super, danke, dann werd ich das mal auf Arbeit ausprobieren.

Greetz
alcaeus


Alle Zeitangaben in WEZ +1. Es ist jetzt 10:31 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz