Re: Inserting data into another server.
Posted in 1999
That's easy:
Define your record as follows:
DEFINE rec_str RECORD LIKE tab.*
Then you can access all columns of tab as fields of rec_str.
Krishnakumar Nandagopal <krishnakn@yahoo.com> on 29.04.99 22:40:25
To: Kai Shen/AEB_HAM/ACER
cc:
Subject: Re: Inserting data into another server.
Hi,
I want to copy the table data to an array of structures....
I have done this in ESQLC. I declared a sturcture with elements similar
to the
columns of the table. Then I declare a SELECT cursor and copy the data
to the
structure.
As a result I had an array of structure equal to the number of rows in
the
table.
I have to do the same thing in 4GL. How do I do it?????
Thanks,
nkrishnakumar
--- Kai_Shen@acer.de wrote:
>
>
> Some requirements:
> Which Informix version? You need I-net which is
> included since IDS 5 (?).
>
> In $INFORMIXDIR/etc/sqlhosts of source_server you
> need an entry similar to
> dest_tcp ontlitcp destination_server i_net>
> In /etc/services of both servers you need an entry
> like
> i_net 1527/tcp # the 1527 must not be used
> before, can be any
> number
>
> Of course destination_server must be known TCPIP
> host.
>
> Then you may do something like
> INSERT INTO dest_database@dest_tcp:table
> SELECT * FROM src_database:table WHERE ...>
> Hope this helps.
>
> Kai
>
>
>
> Please respond to krishnakn@yahoo.com
>
> To: informix-list@iiug.org
> cc: (bcc: Kai Shen/AEB_HAM/ACER)
>
> Subject: Inserting data into another server.
>
>
>
>
> Is it possible to write code in Informix-4gl to move
> data from one server
> to
> another.
>
> I'm planning to do something like
>
> INSERT INTO destination_server.tables...
> SELECT * FROM source_server.tables ....
> WHERE .....>
> Is there any constraints ???
> How do u specify the server name in SQL statement
> ????
>
> Thanks
> nkrishnakumar
>
> -----------== Posted via Deja News, The Discussion
> Network ==----------
> http://www.dejanews.com/ Search, Read,
> Discuss, or Start Your Own
>
>
>
>
>
>
>
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com