sql statement in odbc connector

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
pandujoy
Participant
Posts: 70
Joined: Tue May 13, 2008 1:37 pm

sql statement in odbc connector

Post 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
betterthanever
Participant
Posts: 152
Joined: Tue Jan 13, 2009 8:59 am

Re: sql statement in odbc connector

Post by betterthanever »

create the table def. from required fields if you want to run the join at the DB level..
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That's exactly what it uses - "regular" sql. So if you need to join tables in your query, go for it.
-craig

"You can never have too many knives" -- Logan Nine Fingers
pandujoy
Participant
Posts: 70
Joined: Tue May 13, 2008 1:37 pm

Post 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?
richdhan
Premium Member
Premium Member
Posts: 364
Joined: Thu Feb 12, 2004 12:24 am

Post 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
dipakparekh
Participant
Posts: 4
Joined: Tue Dec 22, 2009 3:21 pm

sql statement in odbc connector

Post by dipakparekh »

Hi did you get answer to your question. I have the same question actually.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply