Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de [53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id QAA84478 for ; Mon, 3 Apr 2000 16:32:18 -0400 (EDT) (envelope-from wieck@debis.com) Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-sql@postgresql.org id m12cDOA-0003kGC; Mon, 3 Apr 100 22:23 MET DST Message-Id: From: wieck@debis.com (Jan Wieck) Subject: Re: Novice trouble with plpgsql In-Reply-To: <38E4A147.9CE24925@partitur.se> from Patrik Kudo at "Mar 31, 2000 02:59:51 pm" To: Patrik Kudo Date: Mon, 3 Apr 2000 22:23:58 +0200 (CEST) CC: Alexander Stetsenko , pgsql-sql@postgresql.org Reply-To: Jan Wieck X-Mailer: ELM [version 2.4ME+ PL68 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archive-Number: 200004/21 > 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) #