例えばSQL Server2000までなら、以下のようにAutoNum付き#tempテーブルを作ってデータを任意のソート順で格納してSEELCT文を発行(最後に#tempテーブルをdrop tableで破棄)してあげる方法でナンバーリングが可能だったと思います。

サンプル↓

--仮テーブル生成 ・・・①
create table #test(
RecordID int identity(1,1)
, code int
, period int
)


--データ格納 ・・・①

insert into #test
select code = 1301,Period = 200303 union all
select code = 1301,Period =200403 union all
select code = 1301,Period =200503 union all
select code = 1301,Period =200603 union all
select code = 1301,Period =200703 union all
select code = 1301,Period =200803 union all
select code = 2121,Period =200609 union all
select code = 2121,Period =200709 union all
select code = 2121,Period =200809 union all
select code = 7203,Period =200303 union all
select code = 7203,Period =200403 union all
select code = 7203,Period =200503 union all
select code = 7203,Period =200603 union all
select code = 7203,Period =200703 union all
select code = 7203,Period =200803


--検索 ・・・②
select * from #test


--破棄 ・・・③
drop table #test</blockquote>



続きを読む

例えばローカルフォルダのD:\Workにpdfファイルが2つ格納されているとして、一方のPDFファイル(somosan.pdf)をもう一方のPDFファイル(seppa.pdf)に挿入してPDFを結合して保存する処理をしたい場合、ExcelマクロVBAとかで
Acrobat SDKで用意されたInsertpagesメソッドを利用して記述すればpdfの高速大量挿入は可能↓


ex)

sub pdf_add()


Dim PDDoc_Source As Object

Dim PDDoc_Dest As Object

Dim Result As Long


’インスタンスの生成

Set PDDoc_Source = CreateObject("AcroExch.PDDoc")

Set PDDoc_Dest = CreateObject("AcroExch.PDDoc")


続きを読む"vbscriptでAcrobatを操作する(その1:pdfの追加&結合) "