insert into TempData select * from JJMS_basicInfo where Embranchment not like '%-%'
由於你的語句本身就是模糊查詢(not like)已經佔用時間多了
假如你表的記錄又多的話,肯定出現超時了.
insert into TempData select * from JJMS_basicInfo where patindex('%-%',Embranchment)=0
insert into TempData select * from JJMS_basicInfo where Embranchment not like '%-%'
由於你的語句本身就是模糊查詢(not like)已經佔用時間多了
假如你表的記錄又多的話,肯定出現超時了.
insert into TempData select * from JJMS_basicInfo where patindex('%-%',Embranchment)>0,应该是大于0吧