Re: SQL/PLUS question ( it doesn't work 100 % ?? ) help

From: Christopher Jones <cjones_at_au.oracle.com>
Date: 03 Sep 1994 23:45:38 GMT
Message-ID: <CJONES.94Sep4094538_at_hurrah.au.oracle.com>


In article <dliao.778522723_at_teal> dliao_at_teal.csn.org (Daniel Liao) writes:

> I find some sqlplus commands ( eq. define, column, etc ) don't
> work when I use them in command file. They work fine when I put
> them on command line ( eq. SQL>define xx=tabs ); but it just doesn't
> work when I put it into a file and run that command file??
>
> eq. I make a following file
>
> define xx=tabs
> select * from &xx
> /
>
> Then I get " define is invalid sql command "
> So, what's going wrong??

From your description it sounds like (but you don't give enough detail, so I'm only guessing) you are using GET to load the command file into the SQL buffer and then executing it with RUN. Whenever this buffer is executed, SQL*Plus sends everything in it to the server as a SQL statement (that's why it's called the SQL buffer). The server doesn't know anything about SQL*Plus commands, hence the error. See p3-9 & p3-12 of the SQL*Plus 3.1 UG&R.

Try using the START or _at_ commands to run your command file. See p 3-12.

Chris Received on Sun Sep 04 1994 - 01:45:38 CEST

Original text of this message