I think you would do better to offer money than mercy. -Matt
> -----Original Message----- > From: Joshua Tipton [mailto:[EMAIL PROTECTED]] > Sent: Sunday, April 21, 2002 3: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. > > > > > > > > > > > > ______________________________________________________________________ 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

