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.

Split transfer with SQL

2 posts in Windows NT Last posting was on 2001-01-29 14:04:46.0Z
Juhiz Posted on 2001-01-26 13:53:29.0Z
From: Juhiz
Date: Fri, 26 Jan 2001 08:53:29 -0500
Newsgroups: sybase.public.sqlserver.nt
Subject: Split transfer with SQL
Message-ID: <68F86DE3AC4ED390004C4F0C852569E0.004C4F1C852569E0@webforums>
Lines: 5
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.sqlserver.nt:1281
Article PK: 1088749

How to split transfer table to table?
If you have 10.000 rows (in table A) and you must first transfer 1 to 1000
rows (to table B) and then 1001 to 2000 and then 2001 to 3000....

But how?


Lazar Posted on 2001-01-29 14:04:46.0Z
From: Lazar
Date: Mon, 29 Jan 2001 09:04:46 -0500
Newsgroups: sybase.public.sqlserver.nt
Subject: Re: Split transfer with SQL
Message-ID: <DC70C40935BF796B004D5CC7852569E3.004D982C852569E0@webforums>
References: <68F86DE3AC4ED390004C4F0C852569E0.004C4F1C852569E0@webforums>
Lines: 19
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.sqlserver.nt:1277
Article PK: 1088745

Try that :
1.
bcp [db name]..[tableA] out [file] -c -F1 -L1000 -S[ASE]-U[User]
-P[password]

parametres : [-F firstrow] [-L lastrow]

bcp [db name]..[tableB] in [file] -c -S[ASE]-U[User] -P[password]

then
bcp [db name]..[tableA] out [file] -c -F1001 -L2000 -S[ASE]-U[User]
-P[password]
...

or
2.
bcp out all tableA , and
bcp [db name]..[tableB] in [file] -c -b1000 -S[ASE]-U[User] -P[password]