> Rather, each time you wish to do an insert,
> query the existing data to see what the
> maximum value is existing in the database.
> Add 1 to that and use this as your new value.
> This is guaranteed to not have any holes in
> the sequence.
True, but alas it _doesn't_ guarantee uniqueness, sinc
Good day, everyone,
I have 2 tables and 1 datafile as following:
vehicle_tb
---
v_idint4 primary key
display_idint4
yeartext
maketext
modeltext
...
vehicle_borrow_log
employee_idint4 (foreign key to emp_tb)
v_idint4 (foreign key to vehic
All,
Many thanks for your thoughts on the merging of columns. The tr method would have
killed all the delimiters as a few people noted. The || method in SQL was the winner,
although the final table this has to be done to (4 million records) should kill the
system for a while! Must make sur
"Bryan White" <[EMAIL PROTECTED]> writes:
> This is very slow (acutally I killed it after about 5 minutes):
> select o.date,sum(d.qty * d.price) from orderdetail d,orders o where o.date
> = '6/1/2000' group by o.date;
> This is quick (it takes a couple of seconds):
> select o.date,(select sum(od.
> Bryan White wrote:
> >
> > This statement works:
> > select date, (select sum(qty * price) from orderdetail d where d.orderid
=
> > orders.orderid) from orders
> >
> > But when I try to do something like this:
> >
> > select date, sum(select sum(qty * price) from orderdetail d where
d.orderid
Graham Vickrage wrote:
>
> I am trying to backup a production database running on v6.5 and restore it
> on our test machine running v6.5.
>
> The largest table has about 750,000 rows, the other 5 tables are very small
> approx 100 rows.
>
> When I try to restore the database using "psql -e dat
I am trying to backup a production database running on v6.5 and restore it
on our test machine running v6.5.
The largest table has about 750,000 rows, the other 5 tables are very small
approx 100 rows.
When I try to restore the database using "psql -e database < db.out" I get
the error message
Bryan White wrote:
>
> This statement works:
> select date, (select sum(qty * price) from orderdetail d where d.orderid =
> orders.orderid) from orders
>
> But when I try to do something like this:
>
> select date, sum(select sum(qty * price) from orderdetail d where d.orderid
> = orders.orderi
This statement works:
select date, (select sum(qty * price) from orderdetail d where d.orderid =
orders.orderid) from orders
But when I try to do something like this:
select date, sum(select sum(qty * price) from orderdetail d where d.orderid
= orders.orderid) from orders group by date
I get ER
If one has a unique-id generating sequence that sometimes is bound
to
have holes in it (ie: it could happen that a nextval(seq) happens
without a corresponding INSERT in the table), then how could one
efficiently scan for these holes to recycle them in subsequent INSERTs?
I'm just looking for
10 matches
Mail list logo