天天看點

自動生成文本

為了提高技術部的工作效率,在兩位同僚的需求下,開發了個自動生成文本的工具

1.需求:根據不同的業務類型,不同的城市,對從excel中複制過來的資料,進行自動的比對,分别生成不同格式的文本。

2.開發環境:jdk1.5,sql2000,eclipse3.5,swt開發包

程式中最主要的用到了swt的多線程,程式界面如下:

自動生成文本

用到的存儲過程如下:

SET QUOTED_IDENTIFIER ON

GO

SET ANSI_NULLS ON

ALTER      proc create_temp_table_progress

as

 if exists (select * from sysobjects where name = 'temp_group' and xtype = 'u')

  drop table temp_group

 if exists (select * from sysobjects where name = 'group_list' and xtype = 'u')

  drop table group_list

 --生成臨時表

 select project,city into temp_group from currentSucessList group by project,city

 select t.project,t.city,a.provincename into group_list from temp_group t, areacodetotal a where t.city = a.areaname

SET QUOTED_IDENTIFIER OFF

附上項目檔案,哥們如果感興趣可以下載下傳随便瞅瞅

繼續閱讀