今天客户在对一个美国供应商付款的时候出现如下所示错误,虽然没有做过这种设置,但是从提示的错误可以很明显的看出,一定是供应商银行相关的设置问题。于是赶紧去此供应商银行账户信息去检查,发现有一选项“允许国际付款”,勾上后再尝试付款,成功。
PLSQL TNS单双接点配置实例
以下例子中的IP和实例名均是随意所为。
单节点:
LLKU=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.0.1)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = LLKU)
)
)
双节点:
LLKU=
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 10.0.0.1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP) (HOST = 10.0.0.2)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME =LLKU)
)
)
Oracle RDF文件转换成可对比文件
有时候,为了方便对历史版本修改的追踪,需要对不同版本的RDF文件进行对比,但是RDF类型的文件无法直接进行对比,需要转换成可对比文件,比如TXT,XML等类型的文件。很多人不清楚有没有办法转换成此类类型的文件,其实Oracle Report Builder提供了内置的转换功能,为了方便大家更加明了的操作,于是写下简单的操作文档,以备后用。
获取待核销的预付款发票信息
select ai.invoice_id 发票ID,
ai.invoice_num 发票编号,
ail.line_number 发票行号,
ap_prepay_utils_pkg.get_line_prepay_amt_remaining(ail.invoice_id,
ail.line_number) 待核销金额,
aps.vendor_name 供应商名称
from ap_invoices_all ai,
ap_invoice_lines_all ail,
ap_invoice_distributions_all aid,
gl_code_combinations gcc,
ap_suppliers aps
where 1 = 1
and ai.invoice_id = ail.invoice_id
and aps.vendor_id = ai.vendor_id
and ail.invoice_id = aid.invoice_id
and ail.line_number = aid.invoice_line_number
and aps.enabled_flag = 'Y'
and (aps.end_date_active is null or aps.end_date_active > sysdate)
and ai.invoice_type_lookup_code = 'PREPAYMENT'
–获取为可用状态的预付款发票,即已经对预付款系统内付款完成
and ap_invoices_utility_pkg.get_approval_status(ai.invoice_id,
ai.invoice_amount,
ai.payment_status_flag,
ai.invoice_type_lookup_code) =
'AVAILABLE'
and decode(ai.invoice_type_lookup_code,
'PREPAYMENT',
decode(ai.earliest_settlement_date,
'',
'PERMANENT',
'TEMPORARY')) = 'TEMPORARY'
and ai.accts_pay_code_combination_id = gcc.code_combination_id;
通过传入的字符串并根据分隔符截取出目标字符串
刚刚写一接口的时候,外围系统需要传入一个字符串来作为查询条件查询数据,最后由财务系统返回数据至外围系统,但传入的一个变量数据是一个整体,需要截取获取目标字符串才能作为查询条件,于是写一函数,记录于此以备后用:
–通过传入的字符串并根据分隔符截取出目标字符串(分隔符为',',可自定义分隔符)
declare
p_str varchar2(1000) := 'a,c,g';
l_count number := 0;
l_str varchar2(100); –目标字符串数据
begin
–首先获取字符串特别字符的数量
select nvl(length(regexp_replace(p_str, '[^,]', '')) + 1, 0)
into l_count
from dual;
–如果只有一个字符段,则不处理
if l_count = 0 then
dbms_output.put_line('Data: ' || p_str);
end if;
–如果有多个字符段,则分割
if l_count <> 0 then
for i in 1 .. l_count loop
select regexp_substr(p_str, '[^,]+', 1, i) as str
into l_str
from dual;
dbms_output.put_line('Data' || i || ':' || l_str);
end loop;
end if;
exception
when others then
dbms_output.put_line('error code :' || sqlcode);
dbms_output.put_line('error msg :' || sqlerrm);
end;