2009年1月28日 星期三



2009年1月16日 星期五

各種Integer所佔的記憶體大小

TinyInt ---- 1Byte
SmallInt -- 2Bytes
Int ---------- 4Bytes
BigInt ----- 8Bytes

2009年1月14日 星期三

搜尋時間區間內的所有區間


假設我們要搜尋Start與End時間點內所有的區間(3,4,5,6)
用法如下:
string expression = string.Format("(Start_DateTime<='{0}' AND End_DateTime>='{0}') OR (Start_DateTime<='{1}' AND End_DateTime>='{1}') OR (Start_DateTime>='{0}' AND End_DateTime<='{1}') OR (Start_DateTime<='{0}' AND End_DateTime>='{1}')", startTime, endTime);
DataRow[ ] rows = table.Select(expression);

//此時找到的會是 3,4,5,6 這四個區間

2009年1月1日 星期四