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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Carriage return in PL/SQL script

Re: Carriage return in PL/SQL script

From: Matthias Gresz <GreMa_at_t-online.de>
Date: 1997/12/19
Message-ID: <67d735$4gj$1@news02.btx.dtag.de>#1/1

suisum_at_freenet.edmonton.ab.ca wrote:
>
> Hi all:
>
> How to I compute a result output like this? I have the instance CASE which
> contains users' initial password. I need to check who has changed the
> password.
>
> Result output
> =============
>
> PROMPT userid1
> CONN userid1/password1_at_prod
> PROMPT userid2
> CONN userid2/password2_at_prod
> PROMPT userid3
> CONN userid3/password3_at_prod
>
> I don't know how to write a carriage return. I have tried the following
> script but Oracle asks for SELECT.....INTO clause.
>
> please help out my script:
>
> ==================================================================================
> SPOOL aaa1.sql
> DECLARE
>
> CURSOR conn_cr IS
> SELECT case_owner.ci_oracle_database_users.name,
> case_owner.ci_oracle_database_users.initial_password
> FROM case_owner.ci_oracle_database_users
> ORDER BY case_owner.ci_oracle_database_users.name asc;
>
> BEGIN
>
> -- loop through the database and compute the script to test login of all
> -- users.
>
> FOR conn_row IN conn_cr LOOP
> SELECT 'PROMPT ' || case_owner.ci_oracle_database_users.name
> FROM DUAL;
> SELECT 'CONN ' ||
> case_owner.ci_oracle_database_users.name ||
> '/' ||
> case_owner.ci_oracle_database_users.initial_password ||
> '@prod'

		|| chr(13) || chr(10)	-- with NT

> FROM DUAL;
> END LOOP;
> END;
> /
> SPOOL OFF
 
-- 
Regards

Matthias Gresz    :-)
Received on Fri Dec 19 1997 - 00:00:00 CST

Original text of this message

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