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.

which parti

4 posts in General Discussion Last posting was on 2011-11-10 21:33:33.0Z
parti Posted on 2011-11-10 19:20:00.0Z
Sender: 6685.4ebbf32a.1804289383@sybase.com
From: parti
Newsgroups: sybase.public.ase.general
Subject: which parti
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4ebc23e0.7019.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 10 Nov 2011 11:20:00 -0800
X-Trace: forums-1-dub 1320952800 10.22.241.41 (10 Nov 2011 11:20:00 -0800)
X-Original-Trace: 10 Nov 2011 11:20:00 -0800, 10.22.241.41
Lines: 21
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30661
Article PK: 73552

ase 15.5 dev edition:

create table sales ( sreg int, scat char(10), totsales int )
partition by range ( sreg, scat)
( region1 values <= (100, "JJJ"),
region2 values <= (100, "ZZZ"),
region3 values <= (500, "JJJ"),
region4 values <= (500, "ZZZ"),
region5 values <= (1000, MAX)
)

insert into sales select 10, "LLL", 0
---------------

How do I know which partition this row is inserted into. Is
there any new function which will report the partition the
row resides in?

I bcp'd all partition individually and found the row in
partition region1. Based on value "LLL" inserted above, i
thought this will go to partition region2.


J Posted on 2011-11-10 21:23:01.0Z
From: jtotally_bogus@sbcglobal.net (J)
Newsgroups: sybase.public.ase.general
Subject: Re: which parti
Reply-To: J@bogusemailAddress.com
Message-ID: <4ebc4009.22530671@forums.sybase.com>
References: <4ebc23e0.7019.1681692777@sybase.com>
X-Newsreader: Forte Free Agent 1.21/32.243
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 10 Nov 2011 13:23:01 -0800
X-Trace: forums-1-dub 1320960181 10.22.241.152 (10 Nov 2011 13:23:01 -0800)
X-Original-Trace: 10 Nov 2011 13:23:01 -0800, vip152.sybase.com
Lines: 29
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30663
Article PK: 73553

On 10 Nov 2011 11:20:00 -0800, parti wrote:

sreg is 10 < 100, so region1 was selected. Did you have a typo and
mean, "insert into sales select 100, 'LLL', 0" ?

Jay

>ase 15.5 dev edition:
>
>create table sales ( sreg int, scat char(10), totsales int )
>partition by range ( sreg, scat)
>( region1 values <= (100, "JJJ"),
>region2 values <= (100, "ZZZ"),
>region3 values <= (500, "JJJ"),
>region4 values <= (500, "ZZZ"),
>region5 values <= (1000, MAX)
>)
>
>insert into sales select 10, "LLL", 0
>---------------
>
>How do I know which partition this row is inserted into. Is
>there any new function which will report the partition the
>row resides in?
>
>I bcp'd all partition individually and found the row in
>partition region1. Based on value "LLL" inserted above, i
>thought this will go to partition region2.


parti Posted on 2011-11-10 21:27:44.0Z
Sender: 75d3.4ebc412a.1804289383@sybase.com
From: parti
Newsgroups: sybase.public.ase.general
Subject: Re: which parti
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4ebc41d0.7600.1681692777@sybase.com>
References: <4ebc4009.22530671@forums.sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 10 Nov 2011 13:27:44 -0800
X-Trace: forums-1-dub 1320960464 10.22.241.41 (10 Nov 2011 13:27:44 -0800)
X-Original-Trace: 10 Nov 2011 13:27:44 -0800, 10.22.241.41
Lines: 33
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30664
Article PK: 73555


> On 10 Nov 2011 11:20:00 -0800, parti wrote:
>
> sreg is 10 < 100, so region1 was selected. Did you have a
> typo and mean, "insert into sales select 100, 'LLL', 0" ?
>
> Jay

what is the role of second column scat in partition. It was
HHH which is > JJJ....

>
> >ase 15.5 dev edition:
> >
> >create table sales ( sreg int, scat char(10), totsales
> int ) >partition by range ( sreg, scat)
> >( region1 values <= (100, "JJJ"),
> >region2 values <= (100, "ZZZ"),
> >region3 values <= (500, "JJJ"),
> >region4 values <= (500, "ZZZ"),
> >region5 values <= (1000, MAX)
> >)
> >
> >insert into sales select 10, "LLL", 0
> >---------------
> >
> >How do I know which partition this row is inserted into.
> Is >there any new function which will report the partition
> the >row resides in?
> >
> >I bcp'd all partition individually and found the row in
> >partition region1. Based on value "LLL" inserted above, i
> >thought this will go to partition region2.
>


Sherlock, Kevin [TeamSybase] Posted on 2011-11-10 21:33:33.0Z
From: "Sherlock, Kevin [TeamSybase]" <kevin.sherlock@teamsybase.com>
Newsgroups: sybase.public.ase.general
References: <4ebc4009.22530671@forums.sybase.com> <4ebc41d0.7600.1681692777@sybase.com>
Subject: Re: which parti
Lines: 42
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4ebc432d$1@forums-1-dub>
Date: 10 Nov 2011 13:33:33 -0800
X-Trace: forums-1-dub 1320960813 10.22.241.152 (10 Nov 2011 13:33:33 -0800)
X-Original-Trace: 10 Nov 2011 13:33:33 -0800, vip152.sybase.com
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30665
Article PK: 73556

Doesn't matter in your case. Think of the partition range as an index key.

10 < 100 which is the leading column of the key. So, the row belongs in the
first partition. Rows don't flow into the second partition until your keys
are (sreg = 100 AND scat > "JJJ" AND scat <= "ZZZ")

<parti> wrote in message news:4ebc41d0.7600.1681692777@sybase.com...
>> On 10 Nov 2011 11:20:00 -0800, parti wrote:
>>
>> sreg is 10 < 100, so region1 was selected. Did you have a
>> typo and mean, "insert into sales select 100, 'LLL', 0" ?
>>
>> Jay
>
> what is the role of second column scat in partition. It was
> HHH which is > JJJ....
>
>>
>> >ase 15.5 dev edition:
>> >
>> >create table sales ( sreg int, scat char(10), totsales
>> int ) >partition by range ( sreg, scat)
>> >( region1 values <= (100, "JJJ"),
>> >region2 values <= (100, "ZZZ"),
>> >region3 values <= (500, "JJJ"),
>> >region4 values <= (500, "ZZZ"),
>> >region5 values <= (1000, MAX)
>> >)
>> >
>> >insert into sales select 10, "LLL", 0
>> >---------------
>> >
>> >How do I know which partition this row is inserted into.
>> Is >there any new function which will report the partition
>> the >row resides in?
>> >
>> >I bcp'd all partition individually and found the row in
>> >partition region1. Based on value "LLL" inserted above, i
>> >thought this will go to partition region2.
>>