HELP PLZ [message #235662] |
Mon, 07 May 2007 11:15 |
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
|
|
|
|
Re: HELP PLZ [message #235665 is a reply to message #235662] |
Mon, 07 May 2007 11:20 |
sasha400
Messages: 17 Registered: May 2007
|
Junior Member |
|
|
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: HELP PLZ [message #235668 is a reply to message #235665] |
Mon, 07 May 2007 11:26 |
Frank Naude
Messages: 4581 Registered: April 1998
|
Senior Member |
|
|
Change:
fetch customerCursor into c_fist,c_last,c_address, c_city,c_state , c_zip,c_dphone );
to
fetch customerCursor into c_fist,c_last,c_address, c_city,c_state , c_zip,c_dphone;
|
|
|
Re: HELP PLZ [message #235673 is a reply to message #235662] |
Mon, 07 May 2007 11:39 |
sasha400
Messages: 17 Registered: May 2007
|
Junior Member |
|
|
now i got this error
ORA-06550: line 21, column 7:
PLS-00394: wrong number of values in the INTO list of a FETCH statement
ORA-06550: line 21, column 7:
PL/SQL: SQL Statement ignored
ORA-06550: line 29, column 9:
PLS-00394: wrong number of values in the INTO list of a FETCH statement
ORA-06550: line 29, column 9:
PL/SQL: SQL Statement ignored1. 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;
|
|
|
|
|
|
|
|