Oooh. Looks like TIMESTAMP became a reserved keyword.
http://archives.postgresql.org/pgsql-patches/2001-11/msg00038.php
>>> Nicholas Barthelemy <[EMAIL PROTECTED]> 10/22/02 08:39AM >>>
I have just installed redhat 8.0. It comes with postgresql rpms for
7.2.2. I have been trying to get an
applic
Hi ,
I have a small doubt , if any one knows how to know Constraints of a table in Oracle9i , won't you please tell me Warm Regards
Jadcharla SrinivasViipurinkatu 1C 86,00510 HELSINKI,FINLAND.Phone:358408208487(Moblie)Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
I have just installed redhat 8.0. It comes with postgresql rpms for
7.2.2. I have been trying to get an
application I have written to work, but my queries fail whenever I have
queries that use internal
date/time formatting functions.
example:
SELECT a.assignmentid AS "id",
u.lastname || ', ' ||
Hello everybody,
with AlligatorDBC (database connectivity) you are able to join table from
different relational databases f.e.
a table in MySQL mytab and a table in Oracle oratab
This works for Oracle8i, MySQL, Interbase, Birdstep RDM, PostgreSQL and MSSQL.
Select * from oratab, mytab where orat
Is it possible to create a view using tables from two different postgresql
servers?
Thanks
Peter
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
On Wed, 23 Oct 2002, Tomasz Myrta wrote:
> Hi
> I want to perform query looking like this:
>
> select
> user_id,
> a/sum_a as percent_a,
> b/sum_b as percent_b
> from
> users join
> (select
> group_id,
> sum(a) as sum_a,
> sum(b) as sum_b
>from users group by group_id) X
extract(DOW FROM TIMESTAMP TIMESTAMP(a.startdate)) AS "dow",
ERROR: parser: parse error at or near "TIMESTAMP"
Try one of these:
extract(dow from cast(a.startdate as timestamp)) as "dow"
extract(dow from a.startdate) as "dow"
extract(dow from a.startdate::timestamp) as "dow"
I remember I had pro
Uz.ytkownik Stephan Szabo napisa?:
Does using X.group_id=3 in the where clause work better?
It works better, but not if you want to create a view and make
"select * from some_view where group_id=3" :-(
On 7.3 with no statistics for the table, that appears
to move the filter into the subquery pl
hi to all
i need to do a query to a small postgres database
my best efort to the pretended query is in the attached file 'query.txt'
but i need that some rows don't be selected of thouse that the query
returns.
i send in another attached file 'result.txt' with the query result. looking
at conte
On Wed, 23 Oct 2002, Tomasz Myrta wrote:
> Uz.ytkownik Stephan Szabo napisa?:
> > Does using X.group_id=3 in the where clause work better?
> It works better, but not if you want to create a view and make
> "select * from some_view where group_id=3" :-(
But you can't do that anyway, because you do
Użytkownik Carlos Sousa napisał:
hi to all
i need to do a query to a small postgres database
my best efort to the pretended query is in the attached file 'query.txt'
but i need that some rows don't be selected of thouse that the query
returns.
i send in another attached file 'result.txt' with t
Uz.ytkownik Stephan Szabo napisa?:
But you can't do that anyway, because you don't expose group_id
in the original query. I assume user_id was a mistake then and was
meant to be group_id or that both were meant to be in the
select list.
Yes, I meant group_id, but in orginal query I didn't have t
On Wed, 23 Oct 2002, Tomasz Myrta wrote:
> Uz.ytkownik Stephan Szabo napisa?:
> > But you can't do that anyway, because you don't expose group_id
> > in the original query. I assume user_id was a mistake then and was
> > meant to be group_id or that both were meant to be in the
> > select list.
>
On Wed, 23 Oct 2002, Stephan Szabo wrote:
> Did you see the other two queries I gave? On 7.3, both of those queries
> appear (according to explain output) to do the limiting of group_id
> inside the subquery rather than doing the subquery with all rows.
> The explanation above was why I believe
On Wed, 23 Oct 2002, Tomasz Myrta wrote:
> > On Wed, 23 Oct 2002, Tomasz Myrta wrote:
> >
> > > Uz.ytkownik Stephan Szabo napisa?:
> > Without group_id in the select list you couldn't do a where
> > group_id = if the select was a view.
> I know - it was just example of query.
>
> > Did you see t
Peter,
> Is it possible to create a view using tables from two different
> postgresql
> servers?
No.
-Josh Berkus
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/users-lounge/docs/faq.html
Josh Berkus wrote:
Is it possible to create a view using tables from two different
postgresql
servers?
No.
It isn't possible with plain old SQL, but it is possible (albeit ugly) using
contrib/dblink in PostgreSQL 7.2.x. See README.dblink for documentation and
examples.
In PostgreSQL 7.3 (i
> On Wed, 23 Oct 2002, Tomasz Myrta wrote:
>
> > Uz.ytkownik Stephan Szabo napisa?:
> Without group_id in the select list you couldn't do a where
> group_id = if the select was a view.
I know - it was just example of query.
> Did you see the other two queries I gave? On 7.3, both of those queri
Hi;
I've got PostgreSQL 7.2 and I would like to use MSAccess2k as a front end; in
a LAN, because some of my colleagues just use Windows. Where could I find a
ODBC driver for Postgresql to be use under windows2000?
thanks and regards
--
Javier
---(end of broadca
Hi:
Are cursors in plpgsql dynamic or static?
For example :
... /* some code */
FOR rec in SELECT f1,f2
FROM table1 WHERE LOOP
/* some codes that manipulate table1 */
END LOOP;
Do the result set pointed to by the cursor remains
the same even if performed
> Hi;
> I've got PostgreSQL 7.2 and I would like to use MSAccess2k as a
> front end; in a LAN, because some of my colleagues just use Windows.
> Where could I find a ODBC driver for Postgresql to be use under windows2000?
>
> thanks and regards
What about http://odbc.postgresql.org ?
Isn't it e
> Hi;
> I've got PostgreSQL 7.2 and I would like to use MSAccess2k as a
> front end; in a LAN, because some of my colleagues just use Windows.
> Where could I find a ODBC driver for Postgresql to be use under windows2000?
What about http://odbc.postgresql.org ?
Isn't it enough?
--
Tomasz Myrta
Hello;
I've got pluviometric data in a bizarre format (spanish administration is rather
original) and I need to "transpose" them, to be able to use them as time series data
for a model.
The original data are in a format like
cod_var | Year | Month | Ten | RainDay1 | RainDay2 | RainDay3 |
On Wed, 23 Oct 2002, andres javier garcia garcia wrote:
> Hello; I've got pluviometric data in a bizarre format (spanish
> administration is rather original) and I need to "transpose" them, to
> be able to use them as time series data for a model.
> As you may see, the date of a rain datum is def
> I'm sure there's a better way, but I think a series of union alls would
> do it but be rather computationally expensive.
>
> select cod_var, Year, Month, 1 as Day, RainDay1 as Rain
> where Ten=1
> union all
> select cod_var, Year, Month, 2 as Day, RainDay2 as Rain
> where Ten=1
You could do t
Ludwig,
> Are cursors in plpgsql dynamic or static?
>
> For example :
>
> ... /* some code */
> FOR rec in SELECT f1,f2
>FROM table1 WHERE LOOP
>
> /* some codes that manipulate table1 */
> END LOOP;
Technically speaking, that is not a cursor, even though
Josh Berkus <[EMAIL PROTECTED]> writes:
>> Are cursors in plpgsql dynamic or static?
>>
>> FOR rec in SELECT f1,f2
>> FROM table1 WHERE LOOP
>>
>> /* some codes that manipulate table1 */
>> END LOOP;
> Technically speaking, that is not a cursor, even though it serves the same
> purpose.
Hi Folks,
I'm hoping to put together a query that generates a report on a table with
a large number of boolean fields. This report has to be able to adapt to
the number of fields in the table. Essentially, I want it to provide the
sum of TRUE values for each field for a given subset of the table.
Hi Folks,
I'm hoping to put together a query that generates a report on a table with
a large number of boolean fields. This report has to be able to adapt to
the number of fields in the table. Essentially, I want it to provide the
sum of TRUE values for each field for a given subset of the table.
Tom,
You can add
sum( case when then 1 else 0 end)
for each field that you need.
JLL
Tom Haddon wrote:
>
> Hi Folks,
>
> I'm hoping to put together a query that generates a report on a table with
> a large number of boolean fields. This report has to be able to adapt to
> the number of fie
Tom,
> I'm hoping to put together a query that generates a report on a table with
> a large number of boolean fields. This report has to be able to adapt to
> the number of fields in the table. Essentially, I want it to provide the
> sum of TRUE values for each field for a given subset of the tab
Greetings,
I have 3 tables. Two of which (ta and tb) are different
"attributes" the third table (tc) can have.
tc is allowed up to three of each kind of "attributes".
e.g., 3 ta values and 2 tb values.
By assigning ta and tb attributes to each entry in tc you
are also "matching" tb attributes
> Strangely, this is the result we were expecting from our
> original query!
>
> Is it possible that the sub-selects are somehow
> affecting the result sets?
>
>
> Seen on:
> % postmaster --version
> postmaster (PostgreSQL) 7.1.3
>
> and
>
> % postmaster --version
> postmaster (PostgreSQL) 7.1.2
>> Is it possible that the sub-selects are somehow
>> affecting the result sets?
> I think you want to upgrade, 7.3beta at least gives your
> expected output on all the queries when I tried it. I don't
> currently have a 7.2.* system to test on here to try it
> with that series.
I think this may
Hi:
Is there a way to emulate a SELECT..FOR UPDATE to
series of LOCK/SELECT statement.
I tried the following statements using 2 psql
terminals.
T1 | T2
1)BEGIN; |
2)SELECT x | BEGIN;
FROM y |
WHERE y=1
Hi
I want to perform query looking like this:
select
user_id,
a/sum_a as percent_a,
b/sum_b as percent_b
from
users join
(select
group_id,
sum(a) as sum_a,
sum(b) as sum_b
from users group by group_id) X using (group_id)
where group_id=3;
This query works, but very slow. Subquery
> The other forms only move the filtering clauses around. There's
> still only a filter on the outer group_id equaling the inner
> group_id and a filter on group_id=3. It's just a question of
> whether it's:
>
> Scan users in subselect from group_id=3, group and aggregate them
> and join wit
37 matches
Mail list logo