Re: [SQL] nextval on insert by arbitrary sequence

2001-07-24 Thread Henry House
On Fri, Jul 20, 2001 at 10:13:04AM -0700, Dado Feigenblatt wrote: [...] > You kind of implied the answer to my question. > You just does it in the client instead of using back stored > functions/triggers or contrived SQL to handle that, right? That's correct. -- Henry House OpenPGP key availab

Re: [SQL] nextval on insert by arbitrary sequence

2001-07-20 Thread David Stanaway
Have you looked at the serial type? This type creates an explicity sequence with a predictable name: tblname_rowname_seq and has a default value that selects the next val from that sequence. You can get the value of the most recently inserted row in your session with CurrVal('tblname_rowname_se

Re: [SQL] nextval on insert by arbitrary sequence

2001-07-20 Thread Dado Feigenblatt
Josh Berkus wrote: > Dado, > > Maybe we're looking at this the hard way. Have you thought of simply > putting in a DATETIME column and sorting by that? > > -Josh > Sorting? I might have expressed myself wrong. I'm not concerned about sorting. I'm concerned about giving rows in a single table an

Re: [SQL] nextval on insert by arbitrary sequence

2001-07-20 Thread Josh Berkus
Dado, Maybe we're looking at this the hard way. Have you thought of simply putting in a DATETIME column and sorting by that? -Josh __AGLIO DATABASE SOLUTIONS___ Josh Berkus Complete information technology [EMAIL PROTECTE

Re: [SQL] nextval on insert by arbitrary sequence

2001-07-20 Thread Dado Feigenblatt
Henry House wrote: >On Thu, Jul 19, 2001 at 07:17:20PM -0700, Dado Feigenblatt wrote: > >>I'm not sure if I worded the subject right, but my problem is this: >> >>I have a few entries in one table. Each row is the parent of many >>entries in a second table. >>In the second table I have a lot of

Re: [SQL] nextval on insert by arbitrary sequence

2001-07-20 Thread Dado Feigenblatt
Josh Berkus wrote: >Dado, > >>I'm not sure if I worded the subject right, but my problem is this: >> >>I have a few entries in one table. Each row is the parent of many >>entries in a second table. >>In the second table I have a lot of entries referencing the entries >>on >>the first table. >>S

Re: [SQL] nextval on insert by arbitrary sequence

2001-07-20 Thread Henry House
On Thu, Jul 19, 2001 at 07:17:20PM -0700, Dado Feigenblatt wrote: > I'm not sure if I worded the subject right, but my problem is this: > > I have a few entries in one table. Each row is the parent of many > entries in a second table. > In the second table I have a lot of entries referencing the

Re: [SQL] nextval on insert by arbitrary sequence

2001-07-19 Thread Josh Berkus
Dado, > I'm not sure if I worded the subject right, but my problem is this: > > I have a few entries in one table. Each row is the parent of many > entries in a second table. > In the second table I have a lot of entries referencing the entries > on > the first table. > So far so good. Basic f

[SQL] nextval on insert by arbitrary sequence

2001-07-19 Thread Dado Feigenblatt
I'm not sure if I worded the subject right, but my problem is this: I have a few entries in one table. Each row is the parent of many entries in a second table. In the second table I have a lot of entries referencing the entries on the first table. So far so good. Basic foreign key thing. The