pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: wieck@debis.com
To: Patrik Kudo <kudo@partitur.se>
Cc: Alexander Stetsenko <as@anapa.org.ru>
Cc: pgsql-sql@postgresql.org
Subject: Re: Novice trouble with plpgsql
Date: Mon, 3 Apr 2000 22:23:58 +0200 (CEST)
Message-ID: <m12cDOA-0003kGC@orion.SAPserv.Hamburg.dsh.de> (raw)
In-Reply-To: <38E4A147.9CE24925@partitur.se>

> try:
>
> select max(name_of_column) from name_of_table;
>
> Regards,
> Patrik Kudo

    He said PL/pgSQL!

    Try

        var := max(col) from table;

    instead. Looks a little odd, but should work.

>
> Alexander Stetsenko wrote:
> >
> > Hello All
> > Help me please !
> > I need to select max value in plpgsql, but
> > such code seems is not corect:
> >         select into var max(col) from table ;
> > How can I do this ?
> >
> > Thanks you all.
>
>


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#========================================= wieck@debis.com (Jan Wieck) #





view thread (4+ messages)  latest in thread

Message-ID: <m12cDOA-0003kGC@orion.SAPserv.Hamburg.dsh.de>
Permalink:  ../m12cDOA-0003kGC@orion.SAPserv.Hamburg.dsh.de/
Also on:    postgresql.org/message-id/m12cDOA-0003kGC@orion.SAPserv.Hamburg.dsh.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: wieck@debis.com, kudo@partitur.se, as@anapa.org.ru
  Subject: Re: Novice trouble with plpgsql
  In-Reply-To: <m12cDOA-0003kGC@orion.SAPserv.Hamburg.dsh.de>
  References: <38E4A147.9CE24925@partitur.se> <m12cDOA-0003kGC@orion.SAPserv.Hamburg.dsh.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox