Re: [SQL] generate_series with left join

2006-06-28 Thread Pedro B.
On Wed, 2006-06-28 at 15:16 -0500, Aaron Bono wrote: > This should work too: > > select > year_list.year, > one_list.one_count, > two_list.two_count > FROM ( > select years > from generate_series(2006,2009) as years > ) year_list > left outer join ( > select > date

Re: [SQL] generate_series with left join

2006-06-28 Thread Pedro B.
On Wed, 2006-06-28 at 13:34 -0500, Aaron Bono wrote: > select > year_list.year, > count(one.*), > count(two.*) > from ( > select years > from generate_series(2006,2009) as years > ) year_list > left outer join mytable as one on ( > date_part('year', one.date) = year_list.y

[SQL] generate_series with left join

2006-06-28 Thread Pedro B.
Greetings. I'm having some difficulties with my first use of the generate_series function. Situation: cause| integer date | timestamp(2) without time zone cause | date --++---+ 1 | 2006-03-23 15:07:53.63 | 2

Re: [SQL] ... more than one count with left join

2006-02-20 Thread Pedro B.
On Monday 20 February 2006 20:39, Mark R. Dingee Pedro wrote: |>  Pedro, |> |>  Would something such as this suffice? Hello Mark, It's far superior to what i was doing, serialization wise. Thank you. However, it still leaves me with the big headache of the left joins with the &q

Re: [SQL] Given 02-01-2006 to 02-28-2006, output all days.

2006-02-20 Thread Pedro B.
Hello. I'm having difficulties on my first incursion through generate_series. The details: SELECT DATE_TRUNC('month', timestamp '2006-02-01' )::DATE + s.d AS date,       COUNT (o."04-sms") as totalcause98       FROM generate_series(11,19) AS s(d)  LEFT JOIN netopia o ON (substr(o."26-insertTime",

[SQL] PQexec and SPI_exec

2004-08-25 Thread Pedro B.
d it. It returns the values from the "the last insert before this one". What is the proper way to make this method work? I'm sorry if this might be a basic question, but i have tried so many things, that i'm probably too puzzled right now to make any sen

[SQL] Datetime

2004-08-03 Thread Pedro B.
Hello, I'm using a TIMESTAMP column with a now() default which (correctly i assume) uses a '-mm-dd hh:mm:ss' format. Is it possible to make it something like '-mm-dd hh:mm:ss:cc' ? (basically, a DATE and a TIME, but with 2 decimal cases on the :cc and not .c as the TIME format. Tha

[SQL] Newbie (to postgres) question

2004-07-08 Thread Pedro B.
Hello all, First of all, accept my apologies for what is surely a dumb question, and yes i have been reading extensively through all the documents, but i really need to ask this.. :) I have recently started the migration of a large ex-MySql database to postgresql, and im still "adapting" to the

Re: [SQL] INHERITS and Foreign keys

2003-12-22 Thread Pedro
tables in the hierarchy in order to keep the id table in date.) hi same problem here on 7.4 can we vote for this bug somewhere ?! thanks for your time Pedro ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

[SQL] Cross-database references

2003-01-28 Thread Pedro Igor Craveiro e Silva
Title: AIP - Assessoria Informática e Proteção LTDA Someone knows how is going the implementation of cross database references in pgsql ? Would have some future release with this great functionality ?   Thanks,   Pedro Igor

[SQL] PostgreSQL + SSL

2003-01-22 Thread Pedro Igor Craveiro e Silva
I´m trying to config PG with SSL, but i got a error. I create the key and the certificate and put both in $PGDATA directory. I also enabled the ssl option in postgresql.conf. But when i run postmaster i got a error saying that server.key has wrong permissions.   Thanks,   Pedro Igor

[SQL] Function unkown

2003-01-16 Thread Pedro Igor
How is this function ? plpgsql_call_handler() RETURNS language_handler AS 'plpgsql_call_handler' LANGUAGE 'c' VOLATILE; ---Outgoing mail is certified Virus Free.Checked by AVG anti-virus system (http://www.grisoft.com).Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003

[SQL] Data between different databases

2003-01-14 Thread Pedro Igor
I would like to know in how can i reference a table in a database A from a database B. In resume, i want to separate the data in my database in two others databases and make references for them.   Thanks,   Pedro Igor   ---Outgoing mail is certified Virus Free.Checked by AVG anti-virus

[SQL] Query

2003-01-03 Thread Pedro Igor
    I have tried : check (select count(b.id) from B b where b.id = id) <> 0) but doesn´t work ..     I can use trigger here, but i don´t know if is the best solution .      Thanks,           Pedro Igor   

[SQL] PostgreSQL X Resin EE

2003-01-02 Thread Pedro Igor
Have someone used Resin EE with PostgreSQL or actually use both for building applications ? About PostgreSQL i know that is one of the best options for back-end, but what about Resin EE ?   Thanks ...   Pedro Igor 

[SQL] Accent-insensitive

2002-12-06 Thread Pedro Igor
Does have PostgreSQL some option to allow me execute selects accent-insensitive ? I can´t find any reference, including the manual   Pedro Igor

[SQL] Case-insensitive

2002-12-06 Thread Pedro Igor
Someone knows how config the postgresql for case-insensitive mode ?   Pedro Igor

[SQL] SQL QUERY

2002-12-03 Thread Pedro Igor
bles and not only to tbale teste. Someone know how ???   Pedro Igor  

[SQL] System´s database table

2002-11-13 Thread Pedro Igor Craveiro e Silva
I´m looking for the name of the table that contains all databases in my system. I already see this in the postgre manual, but i´m forgot where   Tanks ...   Pedro Igor

Re: [SQL] random rows

2001-04-26 Thread Joao Pedro M. F. Monoo
fetch the n desired rows example SELECT * FROM test_table LIMIT 100 OFFSET 100; this will skip to row number 100 and the fetch the next 100 rows []´s ----- Joao Pedro M. F. Monoo Infortrade Information Systems #183816 Linux Registered User Slackware 7.1 r