Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Database Merge

2 posts in FoxPro Last posting was on 2007-03-16 13:32:29.0Z
Leonid Kizelshteyn Posted on 2007-03-16 00:33:27.0Z
From: "Leonid Kizelshteyn" <leokiz@comcast.net>
Newsgroups: advantage.foxpro
Subject: Database Merge
Date: Thu, 15 Mar 2007 19:33:27 -0500
Lines: 15
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 24.60.25.241
Message-ID: <45f9d6bd@solutions.advantagedatabase.com>
X-Trace: 15 Mar 2007 17:29:01 -0700, 24.60.25.241
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!24.60.25.241
Xref: solutions.advantagedatabase.com Advantage.FoxPro:233
Article PK: 1109588

Hi, all!

I've got an unusual task - to merge 2 ADS DB. Each DB contains multiple
tables. The nature of data is the same.
Can I do it in ARC? To write a program in VFP is toooooooo long...
To make things worth, the result should go in third DB ...:((

Any ideas?

Thanks in advance

Leo


Joachim Duerr (ADS) Posted on 2007-03-16 13:32:29.0Z
From: "Joachim Duerr (ADS)" <jojo.duerr@gmx.de>
Subject: Re: Database Merge
Newsgroups: Advantage.FoxPro
References: <45f9d6bd@solutions.advantagedatabase.com>
Organization: iAnywhere
User-Agent: XanaNews/1.18.1.2
X-Face: ,QMv7[luB)BpWAQ~:"kw6n%0ieY63.:g2K3n~8ky0;||5Xle*Xq+=~<Fy:0CVC2nx@8~vZ
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
NNTP-Posting-Host: 130.214.79.11
Message-ID: <45fa8e5d@solutions.advantagedatabase.com>
Date: 16 Mar 2007 06:32:29 -0700
X-Trace: 16 Mar 2007 06:32:29 -0700, 130.214.79.11
Lines: 34
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!130.214.79.11
Xref: solutions.advantagedatabase.com Advantage.FoxPro:234
Article PK: 1109587


Leonid Kizelshteyn wrote in <45f9d6bd@solutions.advantagedatabase.com>:

> I've got an unusual task - to merge 2 ADS DB. Each DB contains
> multiple tables. The nature of data is the same. Can I do it in ARC?
> To write a program in VFP is toooooooo long... To make things worth,
> the result should go in third DB ...:((
>
> Any ideas?
>
> Thanks in advance

you could copy one database into a subfolder, then run multiple:

insert into mytable select * from [.\otherdb\mytable]

You can also create a data dictionary, then add all tables of the first
database to it, then copy all tables of the second database to a
subfolder and run a script like that:

declare tb cursor as select name from system.tables;
declare sql string;
open tb;
while fetch tb do
sql='insert into ['+trim(tb.name)+'] select * from
[.\otherdb\'+trim(tb.name)+']';
execute immediate sql;
end while;
close tb;

--
Joachim Duerr
System Consultant (Advantage Database Server)
Sybase iAnywhere
advantagesupport[AT]ianywhere.com