Please help me, I have gotten this far and I am not having any luck.
I need to output the numbers from the sequence into a database.
CREATE SEQUENCE "DeptCodeSeq"
INCREMENT BY 20
START WITH 1000
MAXVALUE 9080
NOCYCLE;
CREATE TABLE "Departments"
("DeptCode" NUMBER(4),
"Name" VARCHAR2(30),
"DeptSize" NUMBER(5));
DECLARE
V_DeptCode "DeptCodeSeq";
v_Name varchar2(30);
v_DeptSize number(5);
BEGIN
for i in v_deptcode.nextval loop
insert into "Departments" ("DeptCode", "Name", "DeptSize")
values (i, v_name, v_deptsize);
end loop;
drop sequence "DeptCodeSeq"
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists