思路:sysobjects ,系統資料表,用於存放資料庫中所有表的資訊。syscolumns ,系統資料表,用於存放資料庫中所有表的列資訊。兩表通過關鍵字id關聯。int型,代表表序號。送上述表中獲得動態表的列名:select b.name from sysobjects a,syscolumns b where a.id=b.id and a.name='TB'然後,便容易處理了。統計用with rollup/cube.具體案例如下:==============================
代碼Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->一、自訂按鈕RFMSStepButton ://////////////RFMSStepButton.h#pragma onceclass RFMSStepButton : public
遊標一般格式:DECLARE 遊標名稱 CURSOR FOR SELECT 欄位1,欄位2,欄位3,... FROM 表名 WHERE ...OPEN 遊標名稱FETCH NEXT FROM 遊標名稱 INTO 變數名1,變數名2,變數名3,...WHILE @@FETCH_STATUS=0 BEGIN SQL語句執行過程... ... FETCH NEXT FROM 遊標名稱 INTO
--> 測試資料: @Tdeclare @T table (id int,name varchar(12),fid int)insert into @Tselect 10001,'路容保潔',10000 union allselect 10002,'路面',10000 union allselect 10003,'路基',10000 union allselect 10004,'橋隧涵',10000 union allselect 10005,'沿線設施',10000 union
老是忘。 CSize GetTextExtent( LPCTSTR lpszString, int nCount ) const;CSize GetTextExtent( const CString& str ) const;Return ValueThe dimensions of the string (in logical units) in a CSize object.RemarksCall this member function to compute the width
1,ASCII(American Standard Code for Information Interchange,美國資訊互換標準代碼) 7位,128個字元。(6位不夠,8位太貴,所以選擇7位) 顧名思義,是一套美國標準,只有美國有的字元。連英鎊符號都沒有的。2,ANSI字元集(American National Standards Institute Processing--8-Bit Single-Byte Coded Craphic Character