NiceMan331
asked on
adding values
i have a table
month_close
year number
month number
how to add all years in the statement
any adjustment for the above code ?
month_close
year number
month number
how to add all years in the statement
declare
y = 2015;
x = 1;
begin
loop
y <= 2100;
loop
x <= 12;
insert into month_close (year, month, ser_start, close_flag) values (y,x,0,0);
end loop;
end loop;
end;
any adjustment for the above code ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Error report:
ORA-06550: line 2, column 3:
PLS-00103: Encountered the symbol "_" when expecting one of the following:
begin function package pragma procedure subtype type use
<an identifier> <a double-quoted delimited-identifier> form
current cursor
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
ORA-06550: line 2, column 3:
PLS-00103: Encountered the symbol "_" when expecting one of the following:
begin function package pragma procedure subtype type use
<an identifier> <a double-quoted delimited-identifier> form
current cursor
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
sorry, my value.
replace _year, _month, etc by v_year, v_month etc ...
replace _year, _month, etc by v_year, v_month etc ...
ASKER
great
thanx
thanx
Open in new window
you could do all of this without pl/sql, btw ...