Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Variable in a select-script

Variable in a select-script

From: wilhelm <wakeschNOwaSPAM_at_gmx.de.invalid>
Date: 2000/06/27
Message-ID: <0b9e2080.86c33313@usw-ex0108-063.remarq.com>#1/1

Hallo friends
i am a beginner in pl/sql.............

how can i introduce a variable in a select-script ? for example:

BEGIN
DECLARE
now_time varchar2(2);
ColName varchar2(7);

BEGIN
now_time:=to_char(sysdate,'mi');

IF now_time='01' THEN
SpName:='wert_20';

select datum, ???now_time??? from tabel1 where datum = (select max(datum) from tabel1) END;
END; Got questions? Get answers over the phone at Keen.com. Up to 100 minutes free!
http://www.keen.com Received on Tue Jun 27 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US