Novice trouble with plpgsql
Novice trouble with plpgsql
От:
Alexander Stetsenko <as@anapa.org.ru>
Дата:
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.
Re: Novice trouble with plpgsql
От:
Patrik Kudo <kudo@partitur.se>
Дата:
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.
Re: Novice trouble with plpgsql
От:
wieck@debis.com (Jan Wieck)
Дата:
> 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) #