Re: sqlplus: chr(10) in sqlprompt?

From: Chuck <skilover_nospam_at_softhome.net>
Date: Tue, 14 Jun 2005 11:41:01 -0400
Message-ID: <1118759634.a5ee260f0839669b3de50694a13fd57f_at_bubbanews>


[Quoted] Michel Cadot wrote:
> "Chuck" <skilover_nospam_at_softhome.net> a écrit dans le message de
> news:1118688897.e3945db861e2a6a41fb703f1c475cc3f_at_bubbanews...
> | Is there a way to set the sqlprompt to something like '<DONE>'||chr(10)?
> |
> | I want to write a korn shell script that runs sqlplus as a coprocess and
> | use something like <DONE> as a code to indicate that query output is
> | finished and it's waiting for another command. Problem is the sqlprompt
> | variable doesn't seem to let me put a newline at the end so I can read
> | it as a complete line from the coprocesses.
> |
> | Thanks.
> | --
> | To reply by email remove "_nospam"
>
> I don't check but this might work:
>
> col myprompt noprint new_value myprompt
> select '<DONE>'||chr(10) myprompt from dual;
> set sqlprompt '&myprompt'
>
> Regards
> Michel Cadot
>
>

[Quoted] Thanks. It works. I had thought of that myself but was hoping I could find something that would work without having to first be connected to the Database.

I think what I'm going to end up doing is something a little different. Instead of looking for the SQLPROMPT, I'm going to issue a PROMPT <DONE> after every SQL I execute and just check for that.

Thanks again. If you (or anyone) comes up with a way to set SQLPROMPT without first connecting to a database I'd still be interested.

-- 
To reply by email remove "_nospam"
Received on Tue Jun 14 2005 - 17:41:01 CEST

Original text of this message