> -----Original Message-----
> From: Kim Green [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 04, 2001 10:13 AM
> To: '[EMAIL PROTECTED]'
> Subject: FW: Bind variables
>
>
>
> > My script has a statement handle that accepts only one
> parameter. I am
> > assigning the parameter given to the $ARGV[0]. I run the
> script from the
> > command line, also sending the parameter. I am also
> assigning all selected
> > values to an array for output.
> > I continue to get this message:
> > Can't execute file handle: ORA-01008: not all variables bound (DBD:
> > oexfet error)
> >
> > Here is most of the statement:
> > $fetch_GLD_BILL_details= $dbh->prepare("select distinct
> > substr(ne.general_18,82,1) CLASS,
> > substr(ne.general_18,83,1) MSG_TYPE,
> > c.charge AMOUNT,
> > ne.c_party_id MAIN_BILL_NUM,
> > SUBSTR(ne.a_party_id,1,3) CALLING_NPA,
> > SUBSTR(ne.a_party_id, 4,3) CALLING_NXX,
> > SUBSTR(ne.a_party_id,7,10) CALLING_LINE,
> > rc2.abbreviation FROM_CITY_STATE,
> > DECODE(SUBSTR(ne.a_party_id,1,3),SUBSTR(ne.b_party_id,
> 1,3), 'A', 'R')
> > Inter_Intra,
> > DECODE(NE.EVENT_SUB_TYPE_CODE,110,
> NE.C_PARTY_ID,'0000000000') AUTH_CODE,
> >
> > DECODE(ne.event_sub_type_code,110, ne.general_14, '0000') PIN,
> > NVL(cnda.index1_value, '000000000000') PAC_Code,
> > substr(ne.general_18,4,2) category,
> > SUBSTR(TO_CHAR(I.ISSUE_DATE,'DD-MON-RRRR'),8,11) Stmt_YEAR,
> > TO_CHAR(I.ISSUE_DATE,'MM'),
> > SUBSTR(TO_CHAR(I.ISSUE_DATE,'DD-MON-RR'),1,2) Stmt_DAY
> > FROM customer_node_history cnh,
> > customer_node_da_array cnda,
> > product_instance_history pih,
> > product_history ph,
> > service_history sh,
> > service_type st,
> > charge c,
> > invoice i,
> > and SYSDATE between cnh.effective_start_date and
> cnh.effective_end_date
> > and SYSDATE BETWEEN pih.effective_start_Date and
> pih.effective_end_Date
> > and SYSDATE BETWEEN ph.effective_start_Date and
> ph.effective_end_Date
> > and SYSDATE BETWEEN sh.effective_start_Date and
> sh.effective_end_Date
> > and cnh.node_name_uppercase = ?");
> >
> > $customer_name = $ARGV[0];
Well, you haven't included the line that causes the error. Presumably, you
have an execute() call next. Here is where you need to supply values for
each placeholder:
$fetch_GLD_BILL_details->execute($customer_name);
The first argument to execute binds to the first ? in the SQL, the second
arg binds to the second ?, and so on.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]