Board index » delphi » SQL question

SQL question

I am new at this and I like to transfer fieldnames from a Paradox table to
an Interbase table.

I have tablename called Ordspl (Paradox) and the same name ORDSPL in
Interbase.. The problem is that the Fields are not in the same order as in
the
Interbase fields as in the Paradox table.

I guess you could you by an Sql statement but I don't really know how

-Table Name-  This is the paradox
 Ordspl

-Field Name                Type          Size-
 OrdSpl_Kunr               INTEGER          4
 OrdSpl_UrsprDoknr         INTEGER          4
 OrdSpl_Doknr              INTEGER          4
 OrdSpl_SjvRisk            FLOAT            8
 OrdSpl_SjvRiskMoms        FLOAT            8
 OrdSpl_SjvRiskTyp         SMALLINT         2
 OrdSpl_Momspl             STRING           4

This is the Interbase one
ORDSPL_KUNR INTEGER,
        ORDSPL_URSPRDOKNR INTEGER,
        ORDSPL_DOKNR INTEGER,
        ORDSPL_SJVRISKTYP SMALLINT,
        ORDSPL_MOMSPL VARCHAR(3) CHARACTER SET WIN1252,
        ORDSPL_MOMSBEL DOUBLE PRECISION DEFAULT 0
,
        ORDSPL_SKADEBEL DOUBLE PRECISION DEFAULT 0
,
        ORDSPL_SJVRISKMOMS DOUBLE PRECISION default 0
,
        ORDSPL_SJVRISK DOUBLE PRECISION default 0

Has anybody a clue

/Thomas

 

Re:SQL question


Use a batchmove and map the fields in the string list 'mappings' i do this
when the fields of one table are mis-matched to another.

tom.

Re:SQL question


Hi,

U?ytkownik Thomas Hellberg <or...@bildelskompaniet.se> w wiadomo?ci do grup
dyskusyjnych napisa3:7uf280$l...@forums.borland.com...

Quote
> I am new at this and I like to transfer fieldnames from a Paradox table to
> an Interbase table.

> I have tablename called Ordspl (Paradox) and the same name ORDSPL in
> Interbase.. The problem is that the Fields are not in the same order as in
> the
> Interbase fields as in the Paradox table.

> I guess you could you by an Sql statement but I don't really know how

[...]

> Has anybody a clue

    I think that beter way is to use BatchMove.

--
pozdrowienia [PL] (Regards [GB,US], Su pagarba [LT])
|   /\
| <  >Moskw@
|   \/
|  e-poczta: Mos...@gazeta.pl

"Dobry programista wiesza si razem ze swoim programem."
("A good programmer hangs himself together with his program.")

Re:SQL question


I'm not sure I understand the question. Do you need them to be in the same
order? How did you upsize your table from Paradox to Interbase? Do you
already have data in the Interbase table?

--

Alain Quesnel

P.S.: remove the [brackets] from my address when replying by e-mail.

Quote
Thomas Hellberg <or...@bildelskompaniet.se> wrote in message

news:7uf280$l649@forums.borland.com...
Quote
> I am new at this and I like to transfer fieldnames from a Paradox table to
> an Interbase table.

> I have tablename called Ordspl (Paradox) and the same name ORDSPL in
> Interbase.. The problem is that the Fields are not in the same order as in
> the
> Interbase fields as in the Paradox table.

> I guess you could you by an Sql statement but I don't really know how

> -Table Name-  This is the paradox
>  Ordspl

> -Field Name                Type          Size-
>  OrdSpl_Kunr               INTEGER          4
>  OrdSpl_UrsprDoknr         INTEGER          4
>  OrdSpl_Doknr              INTEGER          4
>  OrdSpl_SjvRisk            FLOAT            8
>  OrdSpl_SjvRiskMoms        FLOAT            8
>  OrdSpl_SjvRiskTyp         SMALLINT         2
>  OrdSpl_Momspl             STRING           4

> This is the Interbase one
> ORDSPL_KUNR INTEGER,
>         ORDSPL_URSPRDOKNR INTEGER,
>         ORDSPL_DOKNR INTEGER,
>         ORDSPL_SJVRISKTYP SMALLINT,
>         ORDSPL_MOMSPL VARCHAR(3) CHARACTER SET WIN1252,
>         ORDSPL_MOMSBEL DOUBLE PRECISION DEFAULT 0
> ,
>         ORDSPL_SKADEBEL DOUBLE PRECISION DEFAULT 0
> ,
>         ORDSPL_SJVRISKMOMS DOUBLE PRECISION default 0
> ,
>         ORDSPL_SJVRISK DOUBLE PRECISION default 0

> Has anybody a clue

> /Thomas

Re:SQL question


You can transfer the data using a TBatchMove component with the Mode
property set to batAppend. You will need to set the Mappings property as
described in the on-line help so the fields will be matched by name instead
of position.

Bill
--

Bill Todd - TeamB
(TeamB cannot respond to questions received via email)

Re:SQL question


You can transfer the data using a TBatchMove component with the Mode
property set to batAppend. You will need to set the Mappings property as
described in the on-line help so the fields will be matched by name instead
of position.

Bill
--

Bill Todd - TeamB
(TeamB cannot respond to questions received via email)

Other Threads