on Wed, 29 May 2002 20:13:13 GMT, Lance Prais wrote:

There is no need to post your message three times in less than 10 minutes.

>  while( my $ln = <BULK> )
>  {
>         chomp($ln);
> #use the items of the
> my $get_case_text = $dbh->prepare("SELECT a.sr_num ,b.name ,b.loc
> ,a.sr_title,f.mid_name ,a.sr_stat_id ,e.name ,f.fst_name ,f.last_name
> ,f.email_addr ,g.country,g.Province
> ,g.zipcode,to_char(a.x_cp_created,'DD-MON-YYYY')
> ,to_char(a.x_cp_closed,'DD-MON-YYYY') ,c.login ,a.desc_text FROM
> s_srv_req a,s_org_ext b,s_employee c,s_postn d,s_org_int e,s_contact
> f,s_addr_org g WHERE a.cst_ou_id = b.row_id and a.cst_con_id =
> f.row_id and a.owner_emp_id = c.row_id and c.pr_postn_id = d.row_id
> and d.ou_id = e.row_id and b.pr_addr_id = g.row_id and sr_num =
> $ln"); 
>         $get_case_text->execute($sr_num) || $dbh->errstr;
>  ($sr_num ,$account_name ,$loc ,$sr_title , $uc_id ,$sr_stat_id
>  ,$group_name 
> ,$fst_name ,$last_name ,$email_addr ,$country,$Province
> ,$zipcode,$x_cp_created ,$x_cp_closed ,$login ,$desc_text) =
> $get_case_text->fetchrow_array();
>         $get_case_text->finish;
> print "--------------> SR(bulk): $sr_num\n";
> print "--------------> User Id(name): $uc_id\n";
>         $line++;
>  }
> close(DAT);
> $dbh->disconnect;


1) move the prepare out and in front of the while-loop
2) replace, in the SQL statement, the 'sr_num = $ln' at the end with
        
        sr_num = ?

3) call the execute statement as follows

        $get_case_text->execute($ln);


-- 
felix

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to