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
TI process error
- jim wood
- Site Admin
- Posts: 3961
- Joined: Wed May 14, 2008 1:51 pm
- OLAP Product: TM1
- Version: PA 2.0.7
- Excel Version: Office 365
- Location: 37 East 18th Street New York
- Contact:
Re: TI process error
Just as a side issue, why Are you using TI to load an SQL table? Wouldn't it make more sense to use DTS/SSIS? After all if further down the line you want execute a TI process you do so from within SQL. There is a section on this in the useful code section. It covers how to execute a TI process from the command line (process or shcedule) which in turn can de kicked off from within SQL.
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7