I have some SQL lying around like this.

column class format a15 heading 'Employee Class'
column ID format a7 heading 'ID'
column name format a27 heading 'Name'
 
set pagesize 175
set linesize 55
set termout off
set feedback off
 
break on class skip 2
compute count of name on class
 
ttitle skip 1 center 'SEARHC Employees Class Count (HR)' skip 2
 
spool &&1
 
select
        ecls_code || '-' || ecls_long_desc as class,
        id_number,
last_name || ', ' || first_name as name
from ap_employee_profile
where empl_status = 'A'
order by class, id_number, name;
spool off



The way that the user has been using this SQL is to put it in a text 
file, feed that text file to sqlplus  and have that output to a text 
file that they can play with.  I would like to be able to do all this in 
the program using DBI.  Is it possible?  What do I need to do to get it 
to work?

I tried just feeding all that stuff into and sth->prepare and then and 
execute but it said that it wasn't a valid SQL statement.    

I don't know if it matters but this is an oracle database running on 
solaris.

Any help would be appreciated.


-- 
Brian Avis
SEARHC Medical Clinic
Juneau, AK 99801
(907) 463-4049
cd /pub
more beer


Reply via email to