SELECT convert(varchar(50),PROBANKD)+'-'+PROKARTN+'-'+convert(varchar(50),PROPDATE)+'-'+PROPTIME as dupa from [HostDataMaster].[dbo].[tblPrArsivstr_201306102008] T ------------------------------------------------ SELECT * INTO HEDE2 FROM ( SELECT convert(varchar(50),PROBANKD)+'-'+PROKARTN+'-'+convert(varchar(50),PROPDATE)+'-'+PROPTIME as dupa from [HostDataMaster].[dbo].[tblPrArsivstr_201306102008] T WHERE PROPDATE>=20130501 GROUP BY convert(varchar(50),PROBANKD)+'-'+PROKARTN+'-'+convert(varchar(50),PROPDATE)+'-'+PROPTIME HAVING COUNT(convert(varchar(50),PROBANKD)+PROKARTN+convert(varchar(50),PROPDATE)+PROPTIME)>1))H