Page 1 of 1

sql statement in odbc connector

Posted: Wed Nov 11, 2009 11:33 am
by pandujoy
Hi ,

I am new to datastage.....Just a small or may be foolish question...

Can we use a regular SQL statement in ODBC connector stage...When i mean regular SQl.....like if i am getting 3 fields form tabel A and 6 fields form table B....how to import the table definitions.

Or should i just join stage to join these two tables........cant i use them as a SQl query in ODBC connector stage.

thanks in advance

Re: sql statement in odbc connector

Posted: Wed Nov 11, 2009 11:40 am
by betterthanever
create the table def. from required fields if you want to run the join at the DB level..

Posted: Wed Nov 11, 2009 11:43 am
by chulett
That's exactly what it uses - "regular" sql. So if you need to join tables in your query, go for it.

Posted: Wed Nov 11, 2009 12:13 pm
by pandujoy
thanks for you reply.....so when you mean create table definition...all that i need is to import the table definitions of both the tables into the stage right?

Posted: Thu Nov 12, 2009 3:24 am
by richdhan
Hi,

Yes you have to import the required columns from both the tables into the stage and use user-defined SQL.

My advise for someone new to DS would be

1. Do your homework before posting questions. Just go through the official documentation.

2. Always give it a shot. If it works good. If it fails then you can come back and do a search in DSXchange. The search is very extensive and most of the time you get answers from the search results.

All the best.

--Rich

sql statement in odbc connector

Posted: Thu Jan 07, 2010 7:17 pm
by dipakparekh
Hi did you get answer to your question. I have the same question actually.

Posted: Thu Jan 07, 2010 9:35 pm
by chulett
Then the same answer given here applies to you as well... as does the one you got in your own thread. If you still need help, please make sure and continue the conversation in the thread you started rather than here.

Thanks.