public class SpiltString { public String spilt(String str) { StringBuffer sb = new StringBuffer(); String[] temp = str.split(","); for (int i = 0; i < temp.length; i++) { if (!"".equals(temp[i]) && temp[i] != null) s
set @InsertStr='INSERT INTO [dbo].[T_SchoolPercentMonth]([SchoolID],[MonthOfYear],[PercentNum]) VALUES('''+cast(@SchoolID as nvarchar)+''','''+convert(char(7),getdate(),20) +''','+cast(@PercentNum as nvarchar)+')'; 引用字符 加一对单引号. 'select * from tb wher