If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Sybase > About segment

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-18-08, 10:37
sridhar.Y sridhar.Y is offline
Registered User
 
Join Date: Feb 2008
Posts: 27
About segment

Hi All,

THe issue is that while splitting large table into TWO segmnet This my table name is XYZ i just want to splitte my row in thae table XYZ in to two half's and i wnat to place them into two segments.

By using BCP out i will take the data of XYZ to one path, how can do BCP in into two parts?

OR is there any way that we can take on half of data from a table

EX; if a table having 20 rows i want to take only 10 rows out orelse

is there any way to splitte the bcp out of 20 row into two halfs
Reply With Quote
  #2 (permalink)  
Old 03-22-08, 20:58
trvishi trvishi is offline
Registered User
 
Join Date: Sep 2003
Location: Switzerland
Posts: 443
You can bcp out selective data no problem... But trying to place specific rows in specific segments, is I dont think is possible...

What are you trying to achieve ?
Reply With Quote
  #3 (permalink)  
Old 03-24-08, 05:05
sridhar.Y sridhar.Y is offline
Registered User
 
Join Date: Feb 2008
Posts: 27
Quote:
Originally Posted by trvishi
You can bcp out selective data no problem... But trying to place specific rows in specific segments, is I dont think is possible...

What are you trying to achieve ?
Hi trivishi,

i just want splitt my table into two parts place the in two segmens....and how we will select that perticular data whie bcp out ..................
Reply With Quote
  #4 (permalink)  
Old 03-24-08, 05:17
71189131 71189131 is offline
Registered User
 
Join Date: Jan 2008
Posts: 16
you can partition the table
Reply With Quote
  #5 (permalink)  
Old 03-24-08, 05:25
sridhar.Y sridhar.Y is offline
Registered User
 
Join Date: Feb 2008
Posts: 27
Hi,
thank's
Reply With Quote
  #6 (permalink)  
Old 03-24-08, 07:42
trvishi trvishi is offline
Registered User
 
Join Date: Sep 2003
Location: Switzerland
Posts: 443
Keep in mind, partition is not as mature in Sybase depending on the version you use. And it requires some maintenance. So, evaluate it before using it in production.
Reply With Quote
  #7 (permalink)  
Old 03-31-08, 03:30
jayantpathak jayantpathak is offline
Registered User
 
Join Date: Feb 2008
Posts: 12
Using Table partitioning

Hi Sridhar,

Yes, We can do one thing in sybase . Table partitioning is one concept in P&T Guid. Using that we can split the tabel accross the multiple segment. Do the BCP out and after creation of partition do the BCP in for 10 rows.

Regard
Jayant

Quote:
Originally Posted by sridhar.Y
Hi All,

THe issue is that while splitting large table into TWO segmnet This my table name is XYZ i just want to splitte my row in thae table XYZ in to two half's and ithem into two se wnat to place gments.

By using BCP out i will take the data of XYZ to one path, how can do BCP in into two parts?

OR is there any way that we can take on half of data from a table

EX; if a table having 20 rows i want to take only 10 rows out orelse

is there any way to splitte the bcp out of 20 row into two halfs
Reply With Quote
  #8 (permalink)  
Old 04-03-08, 08:22
corral corral is offline
Registered User
 
Join Date: Aug 2002
Location: Madrid, Spain
Posts: 83
bcp in syntax allows giving the partition. For instance:
bcp MYTABLE:3 in ...
for loading rows into partition 3.

So, to distribute partitions evenly, you may bcp out the entire table, write down the number of rows, truncate the table and bcp in with the syntax above and options -F and -L. -F and -L give the first and last record in the bcp file to be copied into the table. For instance, had the table have three partitions and 3000 rows:
bcp MYTABLE:1 in ... -L1000
bcp MYTABLE:2 in ... -F1001 -L2000
bcp MYTABLE:3 in ... -F2001

Regards,
Mariano Corral
Reply With Quote
  #9 (permalink)  
Old 04-03-08, 23:53
sridhar.Y sridhar.Y is offline
Registered User
 
Join Date: Feb 2008
Posts: 27
Thanks a lot Corral
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On