- Mar 07 Tue 2017 17:24
-
【MS SQL】T-SQL - Where條件判斷大小寫
- Oct 04 Tue 2016 11:29
-
【MS SQL】多筆資料合併成一欄位
- Sep 30 Fri 2016 11:39
-
【C#.Net】GridView的RowCommand, 如何取得RowIndex
方法一:
直接元件的CommandArgument給予RowIndex
CommandArgument='<%# Container.DataItemIndex%>'
方法二:
在RowCommand中,再取得RowIndex, 其中的Button請自行修改為使用的元件
- Sep 21 Wed 2016 13:59
-
【C#.Net】ToolTip換行
- Sep 06 Tue 2016 16:09
-
【C#】Split使用【字串】切割String成陣列
string[] strArrayContent = Text.Split(new string[] { "Split字串" }, StringSplitOptions.RemoveEmptyEntries);
參考來源:C# 解決普遍SPLIT只能使用單一【字元】切割STRING成陣列 ; 並以【字串】來切割STRING成陣列。
- Sep 06 Tue 2016 15:53
-
【C#】Visaul Studio 元件中的Text或其它屬性如何帶多個參數
方法一:
(, 為分隔,可自行變更為其它符號)
Text='<%# Eval("欄位名1") + "," + Eval("欄位名2") %>'
方法二:
(, 為分隔,可自行變更為其它符號)
- Aug 17 Mon 2015 16:47
-
使用 charindex + CROSS APPLY 將資料單欄轉多欄
使用 charindex + CROSS APPLY 將資料單欄轉多欄
範例如下:
DECLARE @table table (CustDetail varchar(500))
insert into @table
- Apr 24 Fri 2015 17:43
-
GridView OnClientClick 取得TemplateField的ClientID
OnClientClick='<%# string.Format("return YourScriptFunction(\"{0}\")", ((GridViewRow)Container).FindControl("Control ID").ClientID) %>'
以下的寫法會有PostBack問題
OnClientClick='<%# string.Format("javascript:YourScriptFunction(\"{0}\")", ((GridViewRow)Container).FindControl("Control ID").ClientID) %>'
參考網站:
http://www.codeproject.com/Questions/523909/Theplusserverplustagplusisplusnotpluswellplusforme
- Sep 05 Thu 2013 11:01
-
MS SQL 計算百分比 ( Calculate Percent on Total / of Column )
select MobileType, COUNT(*) as CNT
, Convert(DECIMAL(5, 0), COUNT(*)* 100.0/sum(count(*)) over () ) as Rate
from BannerClick
group by MobileType
- Aug 26 Mon 2013 17:43
-
備份資料庫時一併壓縮檔案 (SQL 2008)
SQL 2008 備份資料庫時一併壓縮檔案
BACKUP DATABASE MyDB TO DISK='D:\SQLBACKUPS\MyDB.bak'
WITH COMPRESSION
GO
- Jul 03 Wed 2013 17:07
-
MS SQL 判斷temp table是否存在與刪除
方法一:
if object_id('tempdb..#tempTable') is not null
drop table #tempTable
方法二:
Begin Try drop table #tempTable End Try Begin Catch End Catch
- May 04 Tue 2010 11:28
-
MS SQL 寫實體檔(如 文字檔)
CREATE PROCEDURE [dbo].[sp_AppendToFile](@FileName varchar(255), @Text1 varchar(max), @Append int)
AS
DECLARE @FS int, @OLEResult int, @FileID int
EXECUTE @OLEResult = sp_OACreate 'Scripting.FileSystemObject', @FS OUT
IF @OLEResult <> 0 PRINT 'Scripting.FileSystemObject'