Home » Developer & Programmer » Forms » Variable in a message
Variable in a message [message #80197] Thu, 22 August 2002 01:54 Go to next message
Wilbert
Messages: 2
Registered: August 2002
Junior Member
Hi I have his code:

[[code]]
DECLARE
VDeelnemerid INTEGER;

BEGIN
Select max(deelnemerid) INTO VDeelnemerid from deelnemer;
VDeelnemerid := VDeelnemerid + 1;

IF :deelnemerid NOT LIKE VDeelnemerid THEN

MESSAGE('Het volgende deelnemerid moet als nummer, &VDeelnemerid, hebben');
RAISE FORM_TRIGGER_FAILURE;
END if;

END;

Now the idea is that the variable vdeelnemerid
(a number) wil be visible in the message.
But it doesnt work like this.
Anyone have any Iea?

Thanx in advance
Wilbert Corts
Re: Variable in a message [message #80198 is a reply to message #80197] Thu, 22 August 2002 03:44 Go to previous messageGo to next message
nikc
Messages: 1
Registered: August 2002
Junior Member
try to_char(VDmeerlid); leaver '&' out.
Re: Variable in a message [message #80200 is a reply to message #80197] Thu, 22 August 2002 04:52 Go to previous messageGo to next message
Wilbert
Messages: 2
Registered: August 2002
Junior Member
So the total code would be
message ('participant with id',to_char(VDeelnemerlid), blahblahmore text');

Is that right?
NO but this will work [message #80201 is a reply to message #80200] Thu, 22 August 2002 05:52 Go to previous message
NIK.
Messages: 2
Registered: May 2002
Junior Member
So the total code would be
message ('participant with id'||' '||to_char(VDeelnemerlid)||' '||'blahblahmore text');

nik
Previous Topic: call sqlplus from a button, while passing pwd. etc
Next Topic: Needed more info on Oracle9iAS
Goto Forum:
  


Current Time: Fri Sep 17 11:23:08 CDT 2021