2012年9月13日 星期四

informix 序號欄位取值

.net 中,如何取得informix table 新增後serial column  的流水號,然後再傳給另一個table進行使用

--建立測試表
create table  bevtest
    ( col1 serial,
      col2 varchar(50) 
    );

begin work;

insert into bevtest values(0,'test');


--此行需緊接著insert into table 後執行
select dbinfo('sqlca.sqlerrd1') as sn from empty into temp tmpsn with no log;

insert into bevtest select 0,sn||' this is sn"  from tmpsn;

drop table tmpsn;

commit work;

沒有留言:

張貼留言

pdf.js 無法顯示部份字

有個檔案在pdf viewer套件中無法顯示內容,但下載檔案後使用工具又可以正常顯示。 本來以為是套件版本太舊的原因,於是去下載pdf viewer套件 https://github.com/mozilla/pdf.js 更新後還是一樣。 覺得應是字型缺漏的問題,於是用PDF-X...