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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: sql-plus variable error?

Re: sql-plus variable error?

From: Jack van Zanen <nlzanen1_at_ey.nl>
Date: Fri, 28 Apr 2000 14:35:09 +0100
Message-Id: <10481.104399@fatcity.com>


Hi

You have to add another fullstop "." behind the "." between the variable and the table name



INSERT INTO &SCHEMAOWNERTO..HpxCatalog(

"." is substitution variable end mark

Jack

"Guang Mei" <zlmei_at_hotmail.com>@fatcity.com on 04/28/2000 03:10:20 AM

Please respond to ORACLE-L_at_fatcity.com

Sent by: root_at_fatcity.com

To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> cc:
Subject: sql-plus variable error?

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



Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

--

Author: Guang Mei
  INET: zlmei_at_hotmail.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists

--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).

De informatie verzonden met dit E-mail bericht is uitsluitend bestemd voor de geadresseerde. Gebruik van deze informatie door anderen dan de geadresseerde is verboden. Openbaarmaking, vermenigvuldiging, verspreiding en/of verstrekking van deze informatie aan derden is niet toegestaan. Ernst & Young staat niet in voor de juiste en volledige overbrenging van de inhoud van een verzonden E-mail, noch voor tijdige ontvangst daarvan.

The information contained in this communication is confidential and may be legally privileged. It is intended solely for the use of the individual or entity to whom it is addressed and others authorised to receive it. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this information is strictly prohibited and may be unlawful. Ernst & Young is neither liable for the proper and complete transmission of the information contained in this communication nor for any delay in its Received on Fri Apr 28 2000 - 08:35:09 CDT

Original text of this message

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