excel - PL/SQL CONCAT Function -
goal: have excel document links customer bills.
desired pl/sql output:
account_id | bill_id | '=hyperlink(".\"&'||bill_id||'&"-00.pdf")' -----------+---------+---------- 12345 | 10 | =hyperlink(".\"&10&"-00.pdf") 23456 | 11 | =hyperlink(".\"&11&"-00.pdf") 34567 | 12 | =hyperlink(".\"&12&"-00.pdf")
pl/sql queries (documentation here) not picking second concat , pl/sql developer generates popup title "variables" asking value.
select account_id, bill_id, '=hyperlink(".\"&' || bill_id || '&"-00.pdf")' customer_table
tested
select account_id, bill_id, concat( concat('=hyperlink(".\"&',bill_id),'&"-00.pdf")') customer_table
current output:
account_id | bill_id | '=hyperlink(".\"&'||bill_id||'&"-00.pdf")' -----------+---------+---------- 12345 | 10 | =hyperlink(".\"&10) 23456 | 11 | =hyperlink(".\"&11) 34567 | 12 | =hyperlink(".\"&12)
i havn't seen particular issue in searches update if find solution. see issue or able propose workaround?
&
i.e. ampersand considered substitution operator in sql*plus
. well, having said that, of gui based client tools capable of executing sql*plus commands.
your client tool considering &
substitution operator.
you escape it.
or, set define off
@ session level.
for example,
sql> select 'hyperlink(".\"&10&"-00.pdf")' dual; enter value 10: old 1: select 'hyperlink(".\"&10&"-00.pdf")' dual new 1: select 'hyperlink(".\"&"-00.pdf")' dual 'hyperlink(".\"&"-00.pdf" ------------------------- hyperlink(".\"&"-00.pdf") sql> set define off sql> select 'hyperlink(".\"&10&"-00.pdf")' dual; 'hyperlink(".\"&10&"-00.pdf" ---------------------------- hyperlink(".\"&10&"-00.pdf") sql>
Comments
Post a Comment