Time of Update: 2018-12-03
原帖地址:http://community.csdn.net/Expert/topic/3434/3434688.xml?temp=3.246486E-03--測試資料create table 單位表 (單位代碼 varchar(10),單位名稱 varchar(50))insert 單位表 values('01' ,'中國單位') --1級insert 單位表 values('0101' ,'山東單位') --2級insert
Time of Update: 2018-12-03
原帖地址:http://community.csdn.net/Expert/topic/3230/3230422.xml?temp=.7884485有這樣的資料 欄位1 欄位2 2,4,23 3,6,345 23,56,4 3,3,67取資料的是查詢 欄位1中 條件是 4 那麼在欄位2 在取的是6與 67結果如下============4 64 67------------------------------------------------------
Time of Update: 2018-12-03
原帖地址:http://community.csdn.net/Expert/topic/3452/3452577.xml?temp=.1377375--樣本資料create table [table](A sysname,B varchar(10))insert [table] select 'table_1','a'union all select 'table_2','b'create table table_1(A int)insert table_1 select
Time of Update: 2018-12-03
/*--原帖地址:http://community.csdn.net/Expert/topic/3818/3818559.xml?temp=.9593317--*//*--處理要求在sql資料庫裡有一個名為Pos200502的Database,每個月會有一個類似於這樣名稱(Pos200502 Pos200503)的database我該如何利用sql
Time of Update: 2018-12-03
原帖地址:http://community.csdn.net/Expert/topic/3236/3236660.xml?temp=.9309046表T1(記錄的是產品加工步驟的損耗情況)Cp_No(產品編碼) Cp_Step(加工步驟) Cp_Shl(損耗率)001 1 0.1001 2 0.15001
Time of Update: 2018-12-03
原帖地址:http://community.csdn.net/Expert/topic/3663/3663934.xml?temp=.9100458--測試資料create table PROJECT(id int,name nvarchar(20),parent_id int)insert PROJECT select 1,'所有項目',nullunion all select 2,'項目1',1union all select 3,'項目2',1create table
Time of Update: 2018-12-03
--方法2. 指令碼複製use mastergoif exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_ProcCopyDb]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)drop procedure
Time of Update: 2018-12-03
原帖地址:http://community.csdn.net/Expert/topic/3244/3244874.xml?temp=.5755274表一:MenuTree? Id??????????????????? context????????????????? -----------? ---------------------------1????????????????????? 商場監測系統? 3????????????????????? 綜合報表分析? 4?????????????
Time of Update: 2018-12-03
原帖地址:http://community.csdn.net/Expert/topic/3485/3485588.xml?temp=.8813745--樣本資料create table sale(date datetime,code varchar(10),amt int)insert sale select '2004-10-22','aa',15000union all select '2004-10-22','bb',18000union all select '2004-10-2
Time of Update: 2018-12-03
原帖地址:http://community.csdn.net/Expert/topic/3662/3662135.xml?temp=.4289972--測試資料create table tb(ID int primary key,grade varchar(10),uptime datetime)insert tb select 1 ,'a','2004-12-11'union all select 2 ,'b','2004-12-11'union all select 3 ,'c','2004
Time of Update: 2018-12-03
--建立一個每月最後一個工作日執行的作業,調用上述預存程序實現自動建立資料庫use mastergo--設定 SQL Agent 服務為自動啟動exec msdb..sp_set_sqlagent_properties @auto_start=1go--建立作業exec msdb..sp_add_job @job_name=N'自動建庫處理'--建立作業步驟declare @sql varchar(800),@dbname varchar(250)select @sql=N'exec
Time of Update: 2018-12-03
<?xml version="1.0" encoding="GB2312"?><使用者資訊> <PLMM> <姓名>雲兒</姓名> <年齡>18</年齡> <所在地區>廣州</所在地區> <職業>學生</職業> <愛好>打籃球</愛好>
Time of Update: 2018-12-03
估計無叢集索引的表的大小下列步驟可用於估計儲存沒有叢集索引的表上的資料和任何附加的非叢集索引所需的空間。 計算儲存資料所用的空間。 計算儲存每個附加非叢集索引所用的空間。 匯總計算所得的值。 對於每個計算,都要指定將在表中出現的行數。表中的行數將對錶的大小有直接影響:表中的行數 = Num_Rows計算儲存資料所用的空間若要計算儲存資料所用的空間,請參見估計表的大小。 記下計算所得的值:儲存資料所用的空間 =
Time of Update: 2018-12-03
定義儲存格驗證要求:驗證錯誤後焦點不離開。實現:儲存格的驗證可以使用dgv_details_CellValidating事件。驗證不通過時調用e.Cancel =
Time of Update: 2018-12-03
cross join 是笛卡兒乘積 就是一張表的行數乘以另一張表的行數left join 第一張表的串連列在第二張表中沒有匹配是,第二張表中的值返回nullright join 第二張表的串連列在第一張表中沒有匹配是,第一張表中的值返回null full join 返回兩張表中的行 left join+right joininner join 只返回兩張表串連列的匹配項
Time of Update: 2018-12-03
/*--原帖地址:http://community.csdn.net/Expert/topic/3841/3841808.xml?temp=.4308588--*/--測試資料create table tb(year int,month int,No varchar(10),Name varchar(10),部門 varchar(10),工資 int)insert tb select 2004,10,'A001','AAA','DDD',1000union all select 2004,10,
Time of Update: 2018-12-03
1.驗證中用到的事件private void dataGridView1_CellValidating(object sender, DataGridViewCellValidatingEventArgs e){//用於對某一列資料進行驗證 dataGridView.Rows[e.RowIndex].ErrorText = string.Empty; ....//對每一儲存格資料進行驗證.}private void dataGridView1_DataError(object
Time of Update: 2018-12-03
/*--原帖地址:http://community.csdn.net/Expert/topic/3845/3845290.xml?temp=.3689386--*/--測試資料create table tb(編號 int,性質 varchar(10),數量 int,指標1 decimal(10,1),指標2 decimal)insert tb select 1 ,'00' ,10,1.1 ,10union all select 2 ,'01' ,20,1.2 ,20union all
Time of Update: 2018-12-03
原帖地址:http://community.csdn.net/Expert/topic/3428/3428792.xml?temp=.6476251--樣本資料create table 表(ID int,NUM int)insert 表 select 1,2union all select 2,3union all select 3,2union all select 4,2union all select 5,12union all select 6,2union all select 7,1
Time of Update: 2018-12-03
有 兩個表:表1:借支姓名 日期 借支單號 借支金額 已還金額 未還餘額張三 99-1-1 000001 10000 0 10000李四 99-1-2 000002 5000 0 5000張三 99-2-1 000003 6000 0 6000張三 99-3-1 000004 10000