given a simply table table like this:
create table MyTabl
(id serial,
lname varchar,
primary key (id)
)
I am trying to return the Primary-Key for a given
row regardless of the wanted row already being
in the table.
using something like:
select coalesce
(
(select id from MyTabl where lnam
I found out MUCH later found out
- I could no longer vacuum the Database.
I restored the missing files from a backup and everything
was okay again, after a vacuum of the database the
system cleaned out the older pg_log/ files on its own.
I hope you get things fixed!
My
I might be told off by some better SQL-User here on the list -
still here is my 2 Cents worth
> I needed ROW_NUMBER() in PostGresql and I did find the 'temporary sequence'
> method as a workaround and i think it at least gets the job done relatively
you use:
> CREATE TEMP SEQUENCE rownum
Am Dienstag, 6. März 2007 16:03 schrieb Florian Weimer:
> a | b | c
> ---+---+---
> 5 | 6 | 7
> 2 | 3 | 4
> 1 | 2 | 3
Hi,
couldn't you accomplish this by:
select distinct on (a) * from tablename order by a;
here:
create table tab (a int,b int,c int);
insert into tab values (1,2,3);
insert
d,x.A,x.B,x.C,
from MyDataTable x
left outer join
(
select MissingValues from "1 to 1000" of integers
) IntSeq on MissingValues=x.UniqIntId
I'm hoping that someone has done this and might be able to
point to some function or methode to do this
Thanks,
Stefan Becker
--
email: [
given this.
create table AA (id serial,name varchar(15));
create table BB (id serial,name varchar(15));
insert into AA (name) values ('1243f');
insert into AA (name) values ('asdfef');
insert into AA (name) values ('fdbsfd');
insert into AA (nam
this should work,
#
SELECT date_trunc('day',endtime),count(*)
FROM eg_event where endtime >= '2006-02-01' and endtime < '2006-03-01'
GROUP BY 1
ORDER BY 1;
best regards,
Stefan
Am Donnerstag, 16. März 2006 06:18 schrieb Bryce Nesbitt:
> I've got a working query:
>
> stage=# SELEC
Am Dienstag, 21. Juni 2005 12:01 schrieben Sie:
> hi,in a table with a serial datatype, how do i get the sequence to start at
> a specific number like 10?
Use START in the create sequence statement.
#
create sequence seq_xeingang increment 1 start 1000;
;
CREATE TABLE xeingang
(
id