sample data with 1st 2 chars date,next 2 chars month,next 4 chars hour and minute last 8 chars emp code 2901185001014227
SELECT cast(right([Column 0],8) as int) As empcode,
cast('20130129' as date) +convert(datetime,SUBSTRING([Column 0],5,2)+':'+SUBSTRING([Column 0],7,2)) as ad,1 as MachId,GETDATE() as cd,convert(datetime,SUBSTRING([Column 0],5,2)+':'+SUBSTRING([Column 0],7,2))
FROM [btnetdev].[dbo].[bio29missing1]
No comments:
Post a Comment