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

Home -> Community -> Usenet -> c.d.o.server -> Re: A PL/SQL problem...

Re: A PL/SQL problem...

From: Michel Cadot <micadot_at_netcourrier.com>
Date: 2000/05/23
Message-ID: <8gdh93$1sc3$1@news6.isdnet.net>#1/1

answer embedded

cfs.public <cfs.public_at_wanadoo.fr> a écrit dans le message : 8gc501$dct$1_at_wanadoo.fr...
>
> I am a french developper and I am creating application arround VB and Oracle
> 7.3.4 for Windows NT. Beginner with Oracle administration, could anyone
> assist me ?
>
> I am creating a PL/SQL script that use a variable created with a define
> statement and I need to modify its value within a DECLARE / BEGIN / END;
> statement as follow...
>
> -- Script : TOTO.SQL
>
> define vv = 5;
>
> BEGIN
> -- The following statement is producing an error...
> vv := 6;
> END;
> /
> PROMPT 'VV = ' || &vv;
>
> How can I change the value of vv inside this statement ?

You cannot use a define to do that. Instead you can use a SQL*Plus variable:

var vv number
exec :vv := 6;
print vv

>
> Otherwise, I need to check the value of vv, so I use an IF / THEN / ELSE /
> END IF; statement.
>
> Is there any way to use this statement outside an BEGIN / END; statement in
> a PL/SQL script ?

Depends on what you want to do.
For instance, you can also use a decode function in a select:

select decode(:vv, 6, <something>, <other>) from ...;

>
> I have another problem (or maybe not for someone probably more experienced
> than me) :
> I have noticed that the UTL_FILE package doesn't run properly with network
> drive under Windows NT 4 and Oracle 7.3.4.
> While I am using this package with a local hard disk drive letter on the NT
> server everything went OK, but when I use the same thing (always on the
> server) with a network drive that points to the server itself an exception
> arise. In my initsid.ora I have checked that the "UTL_FILE_DIR = *", and the
> instance has properly been restarted too. Does anyone experience the same
> thing ?

You can use utl_file only on local drives. On mounted drives, you get an "invalid operation" exception if the user that has launched the Oracle service (System by default) has no i/o rights on the drive and an "Invalid Path" exception otherwise.

>
> I am grateful to anyone for helping me to solve my problem.
>
>
> Claude Santero.
>

--
Have a nice day
Michel
Received on Tue May 23 2000 - 00:00:00 CDT

Original text of this message

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