ok... i'll help a little. a search for 'oracle sequence' at google spits out http://members.tripod.com/mdameryk/CreateSequence.htm as the first hit. now your well on your way.
-----Original Message----- From: Joshua Tipton [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 21, 2002 6:59 PM To: CF-Talk Subject: Oracle Gurus I would be at anyone's mercy if they could do this for me. 1. Create a sequence DeptCodeSeq to generate dept codes in the range 1000, 1020, 1040, . .., 9080 Create table called Departments that has the following columns in it. DeptCode Name DeptSize NUMBER(4) VARCHAR2(30) NUMBER(5) Create a PL/SQL anonymous block called POPDEPTS.sql (Populate Department ) using FOR .. LOOP that uses the DeptCodeSeq to generate the department code and the name Where the name is constructed as DEPT-1020 DEPT-1040, and so on. That is the name of the department is the concatenation of "DEPT-" and the department code generated by the sequence. As each row is inserted print out the department t code and department name delimited by ';' on a separate line. ( use the DBMS_OUTPUT.PUT_LINE ). When testing your code you may need to constantly drop your sequence and create it until your PL/SQL block works correctly. DECLARE ............ ........... BEGIN Your code goes here ( you need FOR .. LOOP statement ) END; 2. Create a PL/SQL block to delete from Departments the departments that have their name ending in 40 and 80 digits. ______________________________________________________________________ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm 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

