HiI run this code to import data from an Excel file on the server.It doesn't error but there is a bug in importing data from a Text datatype column in Excel.The text is in the format 900012345In SQL the datatype is nvarchar 510But during the import it is somehow converted to 9.11343e+007Is there anyway to check that the Excel file has the correct format before importing?Or is there something wrong with the datatype I am using?ALTER PROCEDURE kpi_UploadDataASBEGIN TRANSACTIONSELECT * INTO #zarinvregFROM OpenDataSource('Microsoft.Jet.OLEDB.4.0','Data Source="c:\KPIUpload\Data.xls";Extended properties=Excel 8.0')...zarinvreg_CURR$IF @@ERROR <> 0  	BEGIN				ROLLBACK TRANSACTION				PRINT 'Rolled back'				RETURN			ENDSELECT * INTO #zarageddebtFROM OpenDataSource('Microsoft.Jet.OLEDB.4.0','Data Source="c:\KPIUpload\Data.xls";Extended properties=Excel 8.0')...zarageddebt_CURR$IF @@ERROR <> 0  	BEGIN				ROLLBACK TRANSACTION				PRINT 'Rolled back'				RETURN			ENDSELECT * INTO #baddebtFROM OpenDataSource('Microsoft.Jet.OLEDB.4.0','Data Source="c:\KPIUpload\Data.xls";Extended properties=Excel 8.0')...baddebt_CURR$IF @@ERROR <> 0  	BEGIN				ROLLBACK TRANSACTION				PRINT 'Rolled back'				RETURN			ENDDECLARE @currentmonth varchar(20), @currentyear varchar(4)set @currentmonth = datename(mm,dateadd(mm,-1,getdate())) 	--because they always run this on the 6th working day of month								--Therefore run in December is November's dataset @currentyear =  datepart(yyyy,dateadd(mm,-1,getdate()))INSERT INTO MonthData (MonthDataInt, MonthName, [Year], Published)VALUES			(1, @currentmonth, @currentyear, 0) --it is updated to current month, i.e. month 0, when data is published. In meantime all tables have MonthData = 1INSERT INTO zarinvreg ([Profit ctr], Customer, [Name 1], Docno, [Year], Itm, Type, [Inv ref], [Sales doc], Curr, [Clearing Doc], CoCd, [Doc date], [Amtin loccur], [Count],			[Clearing Date], [LC2 amount], MonthData)SELECT	[Profit ctr], Customer, [Name 1], [Doc#no#], [Year], Itm, Type, [Inv# ref#], [Sales doc#], [Curr#], [Clearing Doc], CoCd, [Doc# date], [Amt#in loc#cur#], [Count],	[Clearing Date], [LC2 amount], 1 AS MonthDataFROM #zarinvregIF @@ERROR <> 0  	BEGIN				ROLLBACK TRANSACTION				PRINT 'Rolled back'				RETURN			END--update division codes?INSERT INTO zarageddebt (Branch, Customer, [Name 1], [Profit ctr], [Inv ref], Docno, Type, [Project Desc], [Sales doc], CoCd, [Doc date], Total, [1To90], [91To120], [121To150],			[151To180], [181To365], MoreThan366, MonthData)SELECT			Branch, Customer, [Name 1], [Profit ctr], [Inv# ref#], [Doc#no#], Type, [Project Desc], [Sales doc#], CoCd, [Doc# date], Total, [ 1  - 90], [91  - 120], [121 - 150],			[151 - 180], [181 - 365], [>= 366], 1 AS MonthDataFROM #zarageddebtIF @@ERROR <> 0  	BEGIN				ROLLBACK TRANSACTION				PRINT 'Rolled back'				RETURN			END --update division codes?INSERT INTO baddebt (	CoCd, Customer, [Name 1], [Profit ctr], Docno, [Sales doc], [Project Desc], [Doc date], Total, Nett, [Bad Debt], MonthData)SELECT			CoCd, Customer, [Name 1], [Profit ctr], [Doc#no#], [Sales doc#], [Project Desc], [Doc# date], Total, Nett, [O/S Bad Debt], 1 AS MonthDataFROM #baddebtIF @@ERROR <> 0  	BEGIN				ROLLBACK TRANSACTION				PRINT 'Rolled back'				RETURN 			END--update division codes?DROP TABLE #zarinvregDROP TABLE #zarageddebtDROP TABLE #baddebtEXEC bonus_DataCorrectionEXEC kpi_UpdateDataCOMMIT TRANSACTIONGO