DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
Author Message
navya123
Participant



Joined: 29 Dec 2010
Posts: 4

Points: 48

Post Posted: Wed Jan 12, 2011 6:38 am Reply with quote    Back to top    

DataStage® Release: 8x
Job Type: Parallel
OS: Windows
hi all,
how can i insert values into sql server2008 table from ds after job routine with out using insert statement is there any posiblity ?I am working in ds 8.1 version and windows o/s

thanks in advance

actually i use the insert statement to insert rows in to sql server table it is working fine it was asked to use any other method other than insert statement and with out using any stages in job which i don't know so.....


I am using sqlconn function to connect to sql server returned the errer code -2 and not connecting to sqlserver db how could i get the errer message


Last edited by navya123 on Tue Jan 18, 2011 3:57 am; edited 3 times in total
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 42520
Location: Denver, CO
Points: 218805

Post Posted: Wed Jan 12, 2011 7:25 am Reply with quote    Back to top    

Best to start by posting in the correct forum so I don't have to move it - the FAQ Discussion forum is for discussing topics that could become FAQ postings, not general support.

With that out of the way, curious why you stated "without using insert statement"? You want to put data in a database table, you need to "insert" it, whether that's a conventional insert or (technically) a bulk load. Taking that out of the equation, there are multiple ways to do what you ask - BCI functions, ODBC calls, a script that calls whatever command line utility the database supports...

What are you trying to accomplish?

_________________
-craig

I know I don't say this enough, but I like when you talk to me. It's much better than when nobody talks to me. Or when people that I don't like will not stop talking to me.
Rate this response:  
Not yet rated
ray.wurlod

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 23 Oct 2002
Posts: 54194
Location: Sydney, Australia
Points: 293930

Post Posted: Wed Jan 12, 2011 4:29 pm Reply with quote    Back to top    

You could use the bulk loader (bcp).

_________________
RXP Services Ltd
Melbourne | Canberra | Sydney | Hong Kong | Hobart | Brisbane
currently hiring: Canberra, Sydney and Melbourne
Rate this response:  
Not yet rated
navya123
Participant



Joined: 29 Dec 2010
Posts: 4

Points: 48

Post Posted: Thu Jan 13, 2011 3:46 am Reply with quote    Back to top    

looking for ODBC calls and a script that calls whatever command line utility the database supports... how can I establish the ODBC connection through ds after job routine and insert records into the sql server table
Rate this response:  
Not yet rated
ray.wurlod

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 23 Oct 2002
Posts: 54194
Location: Sydney, Australia
Points: 293930

Post Posted: Thu Jan 13, 2011 4:37 am Reply with quote    Back to top    

The ODBC calls will require an INSERT statement with parameter markers. SQLAllocEnv() SQLAllocConnect() SQLSetConnectOptions() SQLConnect() SQLAllocStmt() SQLPrepare() and SQLExecute(), or ...

_________________
RXP Services Ltd
Melbourne | Canberra | Sydney | Hong Kong | Hobart | Brisbane
currently hiring: Canberra, Sydney and Melbourne
Rate this response:  
Not yet rated
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 42520
Location: Denver, CO
Points: 218805

Post Posted: Thu Jan 13, 2011 6:29 am Reply with quote    Back to top    

And your command line utility appears to be SQLCMD. I'm sure your DBA could help you with syntax questions.

_________________
-craig

I know I don't say this enough, but I like when you talk to me. It's much better than when nobody talks to me. Or when people that I don't like will not stop talking to me.
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours