Error while uploading to Sql server

Post Reply
User avatar
vinnusea
Posts: 116
Joined: Thu Sep 23, 2010 6:12 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 2010
Location: San Diego ,CA

Error while uploading to Sql server

Post by vinnusea »

Trying to Load Cube View to a Sql Server table

All varibles are defined as "String" and as "Other"
Except vrate is defined as Numeric

odbcoutput( sDSNODBC , Expand('Insert Into [Test].[dbo].ExchangeRate (Version,Type,Month,From,To,Rate) '|'
Values
(''%vversion%'',''%vtype%'',''%vmonth%'',''%vfrom%'',''%vto%'',%vrate%)'));


Getting Error

"Actuals","01-2010","EUR","EUR","FX Type 1","1.",Data Source line (1) Error: Data procedure line (10): Error executing SQL query: "Insert Into [Test].[dbo].ExchangeRate (Version,Type,Month,From,To,v) Values('Actuals','FX Type 1','EUR','01-2010','EUR',1.)"

or sometimes getting error if i use a sql query and approach it
Error executing SQL query: "..."
Can any 1 say me what mistake am doing?
Thanks
Vinnusea
User avatar
Martin Ryan
Site Admin
Posts: 2003
Joined: Sat May 10, 2008 9:08 am
OLAP Product: TM1
Version: 10.1
Excel Version: 2010
Location: Wellington, New Zealand
Contact:

Re: Error while uploading to Sql server

Post by Martin Ryan »

What happens if you go directly into your database and paste in
Insert Into [Test].[dbo].ExchangeRate (Version,Type,Month,From,To,v) Values('Actuals','FX Type 1','EUR','01-2010','EUR',1.)
to the SQL editor? Do you get an error? If so there is something wrong with your SQL. If not, then there's something wrong with your ODBCOpen statement in TI (have you got an ODBCOpen statement in TI?).

If there is no SQL error and the ODBCOpen is ok, then please post your TI code.

Martin
Please do not send technical questions via private message or email. Post them in the forum where you'll probably get a faster reply, and everyone can benefit from the answers.
Jodi Ryan Family Lawyer
User avatar
vinnusea
Posts: 116
Joined: Thu Sep 23, 2010 6:12 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 2010
Location: San Diego ,CA

Re: Error while uploading to Sql server_Defining Varible

Post by vinnusea »

Thanks Martin for the reply..
I dont know what is the error but i kept on re writing the COde and now its running good ..

But Can you tell me how to pass a varible value into a parameter so that i can insert that parameter into a column in Sql table

Issue:

Taking a Cube View as Source and it is having varibles V1,V2,V3,V4,V5 DEFINED and now i have Col1,Col2,Col3,Col4,Col5,Col6 in Target Table

I need to pass V3 | V4 |V5 |'Rate' (Concatinated) into Col 6

In Prolog i used

scol6input = V3|V4|V5|-|'Rate' ;

In Data Tab:

In Sql Statement :

I used scol6input Then its not trowing any error but the Col6 in Target table is having just "- Rate"
My 3 variables are not showing in the target????

How do i get it

Thanks for your time
Thanks
Vinnusea
Post Reply