Skip to Content
author's profile photo Former Member
Former Member

Need to pass two data source name in SQL query in BODS script

Hi Team,

I have a requirement in moving data from one source to another source. My source is Oracle view and destination is SQL table. I need to insert the record from source to destination using script in BODS not query transform.

I have written code below

sql("sql datastore name", "insert into sqltablename (col1,col2) select col1,col2 from oracledatastorename.schemaname.tablename");

I am getting error "oracledatastorename.schemaname.tablename doesn't exist".

could you please help me to resolve this issue or is there any other technique we can use in BODS but i don't want to use Query transform.

Thanks,

Sundaram

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 11, 2014 at 12:55 PM

    Hello

    For this technique to work you must create a SQL Server linked server (to Oracle). The error is nothing to do with Data Services,when you use the SQL function,you delegate all control to the DB.

    If you used a query and 'db links' in your datastores it would achieve exactly what you require without hand coding the SQL.

    Michael

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 12, 2014 at 08:24 AM

    I really do not understand why you would not want to use a query transform for this basic operation. Anyway, if you don't want to, you don't need it. Here is the most of simple of datflows that will suit your purpose well:


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.