TI process error
Posted: Thu Sep 16, 2010 1:30 pm
I have an Issue Loading Data from Csv to SqlServer Using TI
I took CSV as DataSource and created similar table in sql server with varchar(50) for all columns
Here is my Procedure
I tried TI Process and Finally able to load Only Numeric Values Not String Values into Sql Server.
(All Variables are Numeric)
Prolog:
ODBCOpen('SQL_Test','','');
Metadata:
ODBCOUTput('SQL_Test' , 'Truncate Table [ErrorDB].[dbo].[Product]; ');
Data
ODBCOutput( 'SQL_Test', Expand ('Insert INTO [ErrorDB].[dbo].[Product]( Product,ProductName,ProductNumber)
Values ( %V1%, %V2%, %V3%)' ) );
Epilog:
ODBCClose('SQL_Test');
For String am Using ( All Variables are String)
Data :
ODBCOutput( 'SQL_Test', Expand ('Insert INTO [ErrorDB].[dbo].[Product]( Product,ProductName,ProductNumber)
Values ( "%V1%", "%V2%", "%V3%")' ) );
But Its throwing an error always saying cannot insert into table.......xxxxx Values...."xxx","xxx","xxxXX")"
Please let me know what mistake am doing... Its Urgent for me..
thanks and regards
I took CSV as DataSource and created similar table in sql server with varchar(50) for all columns
Here is my Procedure
I tried TI Process and Finally able to load Only Numeric Values Not String Values into Sql Server.
(All Variables are Numeric)
Prolog:
ODBCOpen('SQL_Test','','');
Metadata:
ODBCOUTput('SQL_Test' , 'Truncate Table [ErrorDB].[dbo].[Product]; ');
Data
ODBCOutput( 'SQL_Test', Expand ('Insert INTO [ErrorDB].[dbo].[Product]( Product,ProductName,ProductNumber)
Values ( %V1%, %V2%, %V3%)' ) );
Epilog:
ODBCClose('SQL_Test');
For String am Using ( All Variables are String)
Data :
ODBCOutput( 'SQL_Test', Expand ('Insert INTO [ErrorDB].[dbo].[Product]( Product,ProductName,ProductNumber)
Values ( "%V1%", "%V2%", "%V3%")' ) );
But Its throwing an error always saying cannot insert into table.......xxxxx Values...."xxx","xxx","xxxXX")"
Please let me know what mistake am doing... Its Urgent for me..
thanks and regards