Unix Technical Forum

Something wrong with the script

This is a discussion on Something wrong with the script within the Oracle Miscellaneous forums, part of the Oracle Database category; --> DECLARE t_BAN SERVICE_AGREEMENT.BAN%type; CURSOR copps_cursor IS SELECT BAN, PRODUCT_TYPE, PRODUCT_ID, PRICE_PLAN, PP_SEQ_NO, EXPIRATION_DATE FROM CREDIT_PP; BEGIN FOR copps_rec IN ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database > Oracle Miscellaneous

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008, 10:28 AM
rohityogi@yahoo.com
 
Posts: n/a
Default Something wrong with the script

DECLARE
t_BAN SERVICE_AGREEMENT.BAN%type;

CURSOR copps_cursor IS
SELECT
BAN,
PRODUCT_TYPE,
PRODUCT_ID,
PRICE_PLAN,
PP_SEQ_NO,
EXPIRATION_DATE
FROM
CREDIT_PP;
BEGIN
FOR copps_rec IN copps_cursor LOOP
BEGIN
SELECT BAN INTO t_BAN FROM SERVICE_AGREEMENT WHERE BAN =
copps_rec.BAN;
END;
END LOOP;
END;


I have this script (1.sql) . but when I execute this script I get no
error but instead it halts on the sql prompt

This is what happens:

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.5.0 - Production

SQL> @1.sql
11



Can anyone suggest what is wrong with this script. Thanks a lot in
advance.

regards
Yogi

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-08-2008, 10:28 AM
Sybrand Bakker
 
Posts: n/a
Default Re: Something wrong with the script

On 15 May 2006 12:07:48 -0700, rohityogi@yahoo.com wrote:

>DECLARE
>t_BAN SERVICE_AGREEMENT.BAN%type;
>
> CURSOR copps_cursor IS
> SELECT
> BAN,
> PRODUCT_TYPE,
> PRODUCT_ID,
> PRICE_PLAN,
> PP_SEQ_NO,
> EXPIRATION_DATE
> FROM
> CREDIT_PP;
>BEGIN
> FOR copps_rec IN copps_cursor LOOP
> BEGIN
> SELECT BAN INTO t_BAN FROM SERVICE_AGREEMENT WHERE BAN =
>copps_rec.BAN;
> END;
> END LOOP;
>END;
>
>
>I have this script (1.sql) . but when I execute this script I get no
>error but instead it halts on the sql prompt
>
>This is what happens:
>
>Connected to:
>Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
>With the Partitioning option
>JServer Release 9.2.0.5.0 - Production
>
>SQL> @1.sql
> 11
>
>
>
>Can anyone suggest what is wrong with this script. Thanks a lot in
>advance.
>
>regards
>Yogi


There is nothing wrong with the script, apart from that END; delimits
the BEGIN END; block. It doesn't delimit the script
On line 11 you need to type a /

--
Sybrand Bakker, Senior Oracle DBA
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-08-2008, 10:28 AM
rohityogi@yahoo.com
 
Posts: n/a
Default Re: Something wrong with the script

I added a / at the end of the script at line11 as you said but still
the same

DECLARE
t_BAN SERVICE_AGREEMENT.BAN%type;

CURSOR copps_cursor IS
SELECT
BAN,
PRODUCT_TYPE,
PRODUCT_ID,
PRICE_PLAN,
PP_SEQ_NO,
EXPIRATION_DATE
FROM
CREDIT_PP;
BEGIN
FOR copps_rec IN copps_cursor LOOP
BEGIN
SELECT BAN INTO t_BAN FROM SERVICE_AGREEMENT WHERE BAN =
copps_rec.BAN;
END;
END LOOP;
END;
a/

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.5.0 - Production

SQL> @1.sql
12

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-08-2008, 10:28 AM
Dereck L. Dietz
 
Posts: n/a
Default Re: Something wrong with the script


<rohityogi@yahoo.com> wrote in message
news:1147727667.797968.230430@j73g2000cwa.googlegr oups.com...
> I added a / at the end of the script at line11 as you said but still
> the same
>
> DECLARE
> t_BAN SERVICE_AGREEMENT.BAN%type;
>
> CURSOR copps_cursor IS
> SELECT
> BAN,
> PRODUCT_TYPE,
> PRODUCT_ID,
> PRICE_PLAN,
> PP_SEQ_NO,
> EXPIRATION_DATE
> FROM
> CREDIT_PP;
> BEGIN
> FOR copps_rec IN copps_cursor LOOP
> BEGIN
> SELECT BAN INTO t_BAN FROM SERVICE_AGREEMENT WHERE BAN =
> copps_rec.BAN;
> END;
> END LOOP;
> END;
> a/
>
> Connected to:
> Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
> With the Partitioning option
> JServer Release 9.2.0.5.0 - Production
>
> SQL> @1.sql
> 12
>


Type the "/" on the line where the 12 is.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-08-2008, 10:28 AM
Sybrand Bakker
 
Posts: n/a
Default Re: Something wrong with the script

On 15 May 2006 14:14:27 -0700, rohityogi@yahoo.com wrote:

>DECLARE
>t_BAN SERVICE_AGREEMENT.BAN%type;
>
> CURSOR copps_cursor IS
> SELECT
> BAN,
> PRODUCT_TYPE,
> PRODUCT_ID,
> PRICE_PLAN,
> PP_SEQ_NO,
> EXPIRATION_DATE
> FROM
> CREDIT_PP;
>BEGIN
> FOR copps_rec IN copps_cursor LOOP
> BEGIN
> SELECT BAN INTO t_BAN FROM SERVICE_AGREEMENT WHERE BAN =
>copps_rec.BAN;
> END;
> END LOOP;
>END;



DECLARE
t_BAN SERVICE_AGREEMENT.BAN%type;

CURSOR copps_cursor IS
SELECT
BAN,
PRODUCT_TYPE,
PRODUCT_ID,
PRICE_PLAN,
PP_SEQ_NO,
EXPIRATION_DATE
FROM
CREDIT_PP;
BEGIN
FOR copps_rec IN copps_cursor LOOP
BEGIN
SELECT BAN INTO t_BAN FROM SERVICE_AGREEMENT WHERE BAN =
copps_rec.BAN;
END;
END LOOP;
END;
/

--
Sybrand Bakker, Senior Oracle DBA
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-08-2008, 10:28 AM
rohityogi@yahoo.com
 
Posts: n/a
Default Re: Something wrong with the script

Thanks, Dont laugh for me acting so dumb.



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:35 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com