Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: interactive script prob
"Andy" == Andy Khoo <andy.khoo_at_netcard.com.my> writes:
>
> anyone out there could help me with this accept p_id prompt
> 'enter id:' delete from pat where pid = &p_id /
>
> i get an error. wats wrong ?anyone? thx.
But I don't get an error -- look:
[Platform: SUN (sparc) Solaris 7]
Using Oracle 8.1.7.4
SQL*Plus: Release 8.1.7.0.0 - Production on Mon Mar 24 11:30:34 2003
(c) Copyright 2000 Oracle Corporation. All rights reserved.
Connected to: Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production JServer Release 8.1.7.4.0 - Production SQL} create table pat (pid number); Table created.
Then I create a SQL script file that contains the following:
accept p_id prompt 'Enter ID:' delete from pat where pid = &p_id /
Then I execute that file:
SQL} @my_script Enter ID:4 old 1: delete from pat where pid = &p_id new 1: delete from pat where pid = 4 0 rows deleted.
See? No errors. Now what did you do different to me?
Hope this helps.
Good Luck,
Avi.
Received on Mon Mar 24 2003 - 03:31:45 CST
![]() |
![]() |