Home » SQL & PL/SQL » SQL & PL/SQL » URGNT PLZ WHAT'S WRONG
icon5.gif  URGNT PLZ WHAT'S WRONG [message #235651] Mon, 07 May 2007 10:25 Go to next message
sasha400
Messages: 17
Registered: May 2007
Junior Member
declare
cursor customerCursor
is select c_first||' '||c_last, c_address, c_city,c_state,c_zip ,c_dphone
from customer c;

c_first varchar2(30);
c_last varchar2(30);
c_address varchar2(30);
c_city varchar2(30);
c_state char2(2);
c_zip varchar2(10);
c_dphone varchar2(10);

begin
for c1 in (select count(c.c_id) count_c_id
from customer c ) loop
dbms_output.put_line('There are:'||c1.count_c_id);
end loop;

open customerCursor;
fetch customerCursor into c_first, c_last,c_address, c_city,c_state,c_zip ,c_dphone ;

dbms_output.put_line(chr(13) || chr(13));
dbms_output.put_line('Clearwater Traders mailing List.');
dbms_output.put_line('------------------------');

while customerCursor%FOUND loop
dbms_output.put_line(c_first||c_last||c_address||c_city ||c_state||c_zip ||c_dphone );
fetch customerCursor into c_fist,c_last,c_address, c_city,c_state , c_zip,c_dphone );
end loop;
close customerCursor;
end;
/
error
ORA-06550: line 29, column 92:
PLS-00103: Encountered the symbol ")" when expecting one of the following:

. ( , % ; limit
The symbol "(" was substituted for ")" to continue.1. declare
2. cursor customerCursor
3. is select c_first||' '||c_last, c_address, c_city,c_state,c_zip ,c_dphone
4. from customer c;



Re: URGNT PLZ WHAT'S WRONG [message #235655 is a reply to message #235651] Mon, 07 May 2007 11:00 Go to previous messageGo to next message
Michel Cadot
Messages: 64109
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
1/ Nothing is urgent in a forum
2/ Read How to get a quick answer to your question: TIPS AND TRICKS
3/ Format your post, read How to format your posts
4/ Always post your Oracle version
5/ Don't use IM SPEAK
6/ Use a meaningful subject

Edit your post to fit the requirement.

Regards
Michel
Re: URGNT PLZ WHAT'S WRONG [message #235678 is a reply to message #235655] Mon, 07 May 2007 11:52 Go to previous message
shanthkumaar
Messages: 156
Registered: February 2007
Location: india,chennai
Senior Member

hi,

you don't have to open a new topic for that.
you would have edited the same i guess.
any way,now you got the answer in this thread

so moderators i guess you can lock this one. Cool

regards,
shanth.
Previous Topic: Object References
Next Topic: HELP PLZ
Goto Forum:
  


Current Time: Mon Dec 05 10:44:33 CST 2016

Total time taken to generate the page: 0.05286 seconds