pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Novice trouble with plpgsql
4+ messages / 3 participants
[nested] [flat]

* Novice trouble with plpgsql
@ 2000-03-31 12:23 Alexander Stetsenko <as@anapa.org.ru>
  2000-03-31 12:59 ` Re: Novice trouble with plpgsql Patrik Kudo <kudo@partitur.se>
  2000-04-04 07:05 ` Re: Novice trouble with plpgsql Alexander Stetsenko <as@anapa.org.ru>
  0 siblings, 2 replies; 4+ messages in thread

From: Alexander Stetsenko @ 2000-03-31 12:23 UTC (permalink / raw)
  To: pgsql-sql

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.



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Novice trouble with plpgsql
  2000-03-31 12:23 Novice trouble with plpgsql Alexander Stetsenko <as@anapa.org.ru>
@ 2000-03-31 12:59 ` Patrik Kudo <kudo@partitur.se>
  2000-04-03 20:23   ` Re: Novice trouble with plpgsql Jan Wieck <wieck@debis.com>
  1 sibling, 1 reply; 4+ messages in thread

From: Patrik Kudo @ 2000-03-31 12:59 UTC (permalink / raw)
  To: Alexander Stetsenko <as@anapa.org.ru>; +Cc: pgsql-sql

try:

select max(name_of_column) from name_of_table;

Regards,
Patrik Kudo

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.



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Novice trouble with plpgsql
  2000-03-31 12:23 Novice trouble with plpgsql Alexander Stetsenko <as@anapa.org.ru>
  2000-03-31 12:59 ` Re: Novice trouble with plpgsql Patrik Kudo <kudo@partitur.se>
@ 2000-04-03 20:23   ` Jan Wieck <wieck@debis.com>
  0 siblings, 0 replies; 4+ messages in thread

From: wieck@debis.com @ 2000-04-03 20:23 UTC (permalink / raw)
  To: Patrik Kudo <kudo@partitur.se>; +Cc: Alexander Stetsenko <as@anapa.org.ru>; pgsql-sql

> 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) #





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Novice trouble with plpgsql
  2000-03-31 12:23 Novice trouble with plpgsql Alexander Stetsenko <as@anapa.org.ru>
@ 2000-04-04 07:05 ` Alexander Stetsenko <as@anapa.org.ru>
  1 sibling, 0 replies; 4+ messages in thread

From: Alexander Stetsenko @ 2000-04-04 07:05 UTC (permalink / raw)
  To: pgsql-sql

Thank you all.
Trouble was in column name - "day" :-))))))
Sorry for my stupid question.
Bye



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2000-04-04 07:05 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-03-31 12:23 Novice trouble with plpgsql Alexander Stetsenko <as@anapa.org.ru>
2000-03-31 12:59 ` Patrik Kudo <kudo@partitur.se>
2000-04-03 20:23   ` Jan Wieck <wieck@debis.com>
2000-04-04 07:05 ` Alexander Stetsenko <as@anapa.org.ru>

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