On Sat, Dec 10, 2005 at 09:02:39PM -0600, Foster, Stephen wrote:
> I did see last week something on PLPGSQL and read through that. But
> there has to be something out there that goes in depth on the
> SQL/Function command set(Speaking of functions/procedures).
The standard functions are described
This could be an old conversation for most. I've used PostgreSQL for a
while but I haven't fully use the Procedure/Functions to it fullest
until now. I need to migrate a MS-SQL 2000 database to PostgreSQL.
I've read as much as I could find but I seem to be missing something.
I did see last week
Oh, that's it.
Thank you all very much.
Otto
- Original Message -
From: "Frank Bax" <[EMAIL PROTECTED]>
To:
Sent: Sunday, December 11, 2005 2:23 AM
Subject: Re: [SQL] select count of distinct rows
At 07:53 PM 12/10/05, Havasvölgyi Ottó wrote:
I would like to select the count of d
Yes, almost. I need the list of all different rows.
It's syntax error at the *.
ROW(*)
^
Otto
- Original Message -
From: "Jaime Casanova" <[EMAIL PROTECTED]>
To: "Havasvölgyi Ottó" <[EMAIL PROTECTED]>
Cc:
Sent: Sunday, December 11, 2005 2:16 AM
Subject: Re: select count of d
Well, I find the problem on my end. I was working with a new database
that I forgot to filler yet. Yes, it works. Jaime, I think what he is
trying to do is get the record count. I would agree that using that
statement is a bit much. But using SELECT COUNT(*) FROM mytable; would
give the same t
At 07:53 PM 12/10/05, Havasvölgyi Ottó wrote:
I would like to select the count of distinct rows in a table.
SELECT COUNT(DISTINCT *) FROM mytable;
This does not work. How can I do it with Postgres?
select count(*) from (select distinct * from mytable) as x;
--
Hi,
This works for me but the result is not that what is expected. I returns
with the number of rows in the table, and the distinct has no effect because
there is only one row in the result.
Best Regards,
Otto
- Original Message -
From: "Foster, Stephen" <[EMAIL PROTECTED]>
To: "'H
On 12/10/05, Havasvölgyi Ottó <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I would like to select the count of distinct rows in a table.
>
> SELECT COUNT(DISTINCT *) FROM mytable;
>
> This does not work. How can I do it with Postgres?
>
> Thanks,
> Otto
>
I guess what you need is to know how many times a
On 12/10/05, Foster, Stephen <[EMAIL PROTECTED]> wrote:
> Well this should work but I tried it and it didn't.
>
> SELECT DISTINCT COUNT(*) FROM mytable;
>
No, it shouldn't work... actually is a non-sense, count will return
just one value so there is nothing to be distinct with...
--
regards,
Jaim
Well this should work but I tried it and it didn't.
SELECT DISTINCT COUNT(*) FROM mytable;
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Havasvölgyi Ottó
Sent: Saturday, December 10, 2005 7:07 PM
To: Jaime Casanova
Cc: pgsql-sql@postgresql.org
Subject:
Hi,
Yes, I need to compare all fields. Well, in this case it does not. Is this
impossible?
Thanks,
Otto
- Original Message -
From: "Jaime Casanova" <[EMAIL PROTECTED]>
To: "Havasvölgyi Ottó" <[EMAIL PROTECTED]>
Cc:
Sent: Sunday, December 11, 2005 1:57 AM
Subject: Re: [SQL] select c
On 12/10/05, Havasvölgyi Ottó <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I would like to select the count of distinct rows in a table.
>
> SELECT COUNT(DISTINCT *) FROM mytable;
>
are really all the fields distincts? the table doesn't have a pk?
> This does not work. How can I do it with Postgres?
>
>
Hi,
I
would like to select the count of distinct rows in a
table.
SELECT COUNT(DISTINCT *) FROM
mytable;
This does not work. How can I
do it with Postgres?
Thanks,
Otto
On Thursday 08 December 2005 05:11, Tom Lane wrote:
>Just starting a fresh session should make the problem go away, or if
>that's not practical update the function definition using ALTER
> FUNCTION or CREATE OR REPLACE FUNCTION. (You don't need to actually
> *change* anything about the function, j
14 matches
Mail list logo