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 -> Re: sql-plus variable error?

Re: sql-plus variable error?

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: 2000/04/27
Message-ID: <956867225.9442.0.pluto.d4ee154e@news.demon.nl>#1/1

Use an extra dot to differentiate the variable from the rest of the command, so &SCHEMAOWNERTO..Hpx etc.

Hth,

Sybrand Bakker, Oracle DBA

<gmei_at_my-deja.com> schreef in berichtnieuws 8ea47f$kn7$1_at_nnrp1.deja.com...
> I have the following script in a file:
>
> --
> set verify off
> set feedback off
>
> accept SCHEMAOWNERFROM char prompt 'Enter Owner of the Schema you wish
> to move data FROM:'
> accept SCHEMAOWNERTO char prompt 'Enter Owner of the Schema you wish to
> move data TO:'
>
> select 'insert into HpxCatalog:' from dual;
>
> INSERT INTO &SCHEMAOWNERTO.HpxCatalog(
> CatalogID,
> CatalogName,
> Description,
> Active )
> Values (
> &SCHEMAOWNERTO.HPXSEQ_Catalog.nextval,
> 'Catalog_Name1', -- hardcoded
> '',
> 'T' );
> --
>
> When I run this file in sql-plus, and I enter the two variables (two
> schema names)at prompt, say 'testfrom' and 'testto', I got the
> following error in sql-plus:
>
> 'INSERTINTOHPXCATALOG:'
> -----------------------
> insert into HpxCatalog:
> INSERT INTO testtoHpxCatalog(
> *
> ERROR at line 1:
> ORA-00942: table or view does not exist
>
>
>
> I thought I would get "INSERT INTO testto.HpxCatalog(" stuff with a
> dot "." in it. Any idea what I did wrong?
>
> Thanks.
>
> Guang
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Thu Apr 27 2000 - 00:00:00 CDT

Original text of this message

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