FUNCTIONsp82385_get_next_bill_seqnum/*****************************************************************Procedure Title : Get Next Bill Sequence Number*Name : sp82385_get_next_bill_seq_num*Called by : .NET Console App OCR Bill Import*Programmer : Wayne Sniffen******************************************************************Description: Gets a new sequence number for a CBP Bill* table depending on what table is passed. Tthis* function makes a call to a DB2 stored procedure* cbu001_cbp_key_gen** Maintenance Log:* Name Date Description* Bricot 08/10/2011 Changes sequence for CBP_Bill_seq and EOB_Note_Seq* Bricot 08/02/2011 Change sequence for CBP_Audit_Error*******************************************************************/(intableINVARCHAR2)RETURNVARCHAR2ASv_new_billidVARCHAR2(9);BEGINCASEintableWHEN'CBP_AUDIT_ERROR'THENSELECTto_char(CBP_AUDIT_MESSAGE_SEQ.nextval)intov_new_billidfromdual;return(v_new_billid);WHEN'CBP_BILL'THENSELECTto_char(CBP_BILL_SEQ.nextval)intov_new_billidfromdual;return(v_new_billid);WHEN'CBP_BILL_STATUS'THENSELECTto_char(BILL_STATUS_SEQ.nextval)intov_new_billidfromdual;return(v_new_billid);WHEN'CBP_EOB_NOTE'THENSELECTto_char(CBP_EOB_NOTE_SEQ.nextval)intov_new_billidfromdual;return(v_new_billid);WHEN'CBP_NOTE'THENSELECTto_char(CBP_NOTE_SEQ.nextval)intov_new_billidfromdual;return(v_new_billid);ENDCASE;RETURNv_new_billid;ENDsp82385_get_next_bill_seqnum;