Re: [SQL] references table(multiple columns go here)

2002-12-19 Thread Gary Stainburn
On Thursday 19 Dec 2002 3:17 pm, Tom Lane wrote: > Gary Stainburn <[EMAIL PROTECTED]> writes: > > That did the trick. However, I now have another problem with the > > constraint complaining about there not being an index to refer to. > > However, there is. > > No there isn't: > > jrank

Re: [SQL] references table(multiple columns go here)

2002-12-19 Thread Tom Lane
Gary Stainburn <[EMAIL PROTECTED]> writes: > That did the trick. However, I now have another problem with the constraint > complaining about there not being an index to refer to. However, there is. No there isn't: > jrank int4 not null references ranks(rrank), -- needs sorting

Re: [SQL] references table(multiple columns go here)

2002-12-19 Thread Gary Stainburn
On Thursday 19 Dec 2002 11:30 am, Tomasz Myrta wrote: > Gary Stainburn wrote: > > On Thursday 19 Dec 2002 9:58 am, Tomasz Myrta wrote: > > >Gary Stainburn wrote: > > >>That did the trick. However, I now have another problem with the > > >>constraint > > >>complaining about there not being an index

Re: [SQL] references table(multiple columns go here)

2002-12-19 Thread Tomasz Myrta
Gary Stainburn wrote: On Thursday 19 Dec 2002 9:58 am, Tomasz Myrta wrote: >Gary Stainburn wrote: > >>That did the trick. However, I now have another problem with the >>constraint >>complaining about there not being an index to refer to. However, >>there is. The error is inside declaration o

Re: [SQL] references table(multiple columns go here)

2002-12-19 Thread Gary Stainburn
On Thursday 19 Dec 2002 9:58 am, Tomasz Myrta wrote: > Gary Stainburn wrote: > > That did the trick. However, I now have another problem with the > > constraint > > complaining about there not being an index to refer to. However, > > there is. > > Output below: > > > > create table ranks ( > > ri

Re: [SQL] references table(multiple columns go here)

2002-12-19 Thread Tomasz Myrta
Gary Stainburn wrote: That did the trick. However, I now have another problem with the constraint complaining about there not being an index to refer to. However, there is. Output below: create table ranks ( rid int4 default nextval('ranks_rid_seq'::text) unique not null, rdid characte

Re: [SQL] references table(multiple columns go here)

2002-12-19 Thread Gary Stainburn
Thanks for that Tom On Wednesday 18 Dec 2002 5:50 pm, Tom Lane wrote: > Gary Stainburn <[EMAIL PROTECTED]> writes: > > I've just tried this on a 7.2.1-5 system and get the same error. > > > >> create table jobtypes ( > >> jidint4 default nextval('jobs_jid_seq'::text) unique not null, > >>

Re: [SQL] references table(multiple columns go here)

2002-12-18 Thread Tomasz Myrta
Tom Lane wrote: Gary Stainburn writes: >I've just tried this on a 7.2.1-5 system and get the same error. >>create table jobtypes ( >>jid int4 default nextval('jobs_jid_seq'::text) unique not null, >>jdid character, -- This joint reference >>jrank int4 not null references ranks(rrank),

Re: [SQL] references table(multiple columns go here)

2002-12-18 Thread Tom Lane
Gary Stainburn <[EMAIL PROTECTED]> writes: > I've just tried this on a 7.2.1-5 system and get the same error. >> create table jobtypes ( >> jid int4 default nextval('jobs_jid_seq'::text) unique not null, >> jdid character, -- This joint reference >> jrank

Re: [SQL] references table(multiple columns go here)

2002-12-18 Thread Gary Stainburn
On Wednesday 18 December 2002 4:56 pm, Gary Stainburn wrote: > Hi Tomasz, [snip] > > > create table jobtypes ( > > > jid int4 default nextval('jobs_jid_seq'::text) unique not null, > > > jdid character references ranks(rdid), -- This joint reference > > > jrank

Re: [SQL] references table(multiple columns go here)

2002-12-18 Thread Gary Stainburn
Hi Tomasz, On Wednesday 18 December 2002 4:46 pm, Tomasz Myrta wrote: > Hello again > > Gary Stainburn wrote: > > Hi folks, > > > > how do I define a referene from 2 columns in 1 table to 2 columns in > > another. > > > > I have: > > > > create table ranks ( > > rid int4 default nextval('r

Re: [SQL] references table(multiple columns go here)

2002-12-18 Thread Tomasz Myrta
Hello again Gary Stainburn wrote: Hi folks, how do I define a referene from 2 columns in 1 table to 2 columns in another. I have: create table ranks ( rid int4 default nextval('ranks_rid_seq'::text) unique not null, rdid character references depts(did), -- department rrank int4 not nu

[SQL] references table(multiple columns go here)

2002-12-18 Thread Gary Stainburn
Hi folks, how do I define a referene from 2 columns in 1 table to 2 columns in another. I have: create table ranks ( rid int4 default nextval('ranks_rid_seq'::text) unique not null, rdidcharacter references depts(did), -- department rrank int4 not null,