客戶一直說本來流水編號位數太少
到9999之後 都是10000 10000
資料溢位了 資料溢位了
資料溢位了
資料溢位了
我:ㄚ不會買除臭劑來除臭ㄛ
客戶裝沒聽到
本來的code
var sn = (int)conn.ExecuteScalar(
string.Format(@"SELECT ISNULL(CAST(SUBSTRING(Max({1}), 6, 4) as int), 0) + 1 From {0} WHERE {1} LIKE @Front",
table, column), Para("@Front", front + "%"));
return $"{front}{sn:0000}";
var sn = (int)conn.ExecuteScalar(
string.Format(@"SELECT ISNULL(CAST(SUBSTRING(Max({1}), 6, 5) as int), 0) + 1 From {0} WHERE {1} LIKE @Front",
table, column), Para("@Front", front + "%"));
return $"{front}{sn:00000}";
本來是年度 189999 那之後再建就會190000
歡迎高手低手來看看 指教指教 切磋切磋 教學香腸