티스토리 뷰
아래 쿼리를 사용해보십시오.
insert into dbo.##Table_A00
select
rowID,
SUBSTRING(col1,1,3), case when ISNUMERIC(col2)=1 THEN cast(col2 as numeric (10)) ELSE NULL END,
SUBSTRING(col3,1,3), case when ISDATE(col4)=1 THEN cast(col4 as datetime) ELSE NULL END,
SUBSTRING(col5,1,3), case when ISNUMERIC(col6)=1 THEN cast(col6 as numeric (6)) ELSE NULL END
from
##Table_Alltextfiles
where
col1 = 'A00'
출처
https://stackoverflow.com/questions/39917109
댓글