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;

沒有留言:

張貼留言

IIS 網站無法下載中文檔名檔案因為取消高位元字元

 網址+中文檔案名稱方式下載檔案顯示 404 - 找不到檔案或目錄。 但英數字檔案名稱則可下載。 因為設定GCB IIS,其中1項 將高位元字元預設取消勾選了。 27 TWGCB-04-014-0028 要求篩選與其他限制模組 允許高位元字元 這項原則設定決定查詢...