Results 1 to 9 of 9

Thread: About segment

  1. #1
    Join Date
    Feb 2008
    Posts
    27

    Unanswered: 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

  2. #2
    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 ?

  3. #3
    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 ..................

  4. #4
    Join Date
    Jan 2008
    Posts
    16
    you can partition the table

  5. #5
    Join Date
    Feb 2008
    Posts
    27
    Hi,
    thank's

  6. #6
    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.

  7. #7
    Join Date
    Feb 2008
    Posts
    15

    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

  8. #8
    Join Date
    Aug 2002
    Location
    Madrid, Spain
    Posts
    97
    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

  9. #9
    Join Date
    Feb 2008
    Posts
    27
    Thanks a lot Corral

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •