SQLPrepare failed On Update existing rows only

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
aoriano
Participant
Posts: 15
Joined: Fri Apr 25, 2008 8:00 am

SQLPrepare failed On Update existing rows only

Post by aoriano »

Hi,

I am using an ODBC Stage to access a SQL Server 2000 Database and updates rows on a table.

The option is "Update existing rows only".

My Job had no problem but i added a column in the ODBC stage and now, There's an error on the SQLPrepare Select which determines if the rows exist or not. The select query is generated but there is no space between the last colmun I added and the FROM close.

Does anyone have an idea about why there is such a problem on a generated query ?

Code: Select all

SELECT COL1, COL2, COL3FROM TABLE

SQLSTATE=S0022, DBMS.CODE=207
[DataStage][SQL Client][ODBC][Microsoft][ODBC SQL Server Driver][SQL Server]'COL1' : incorrect column name

SQLSTATE=S0022, DBMS.CODE=207
[DataStage][SQL Client][ODBC][Microsoft][ODBC SQL Server Driver][SQL Server]'COL2' : incorrect column name

SQLSTATE=S0022, DBMS.CODE=207
[DataStage][SQL Client][ODBC][Microsoft][ODBC SQL Server Driver][SQL Server]'COL3FROM' : incorrect column name
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

No space, or a non-space character, between COL3 and FROM ?

How come there is a FROM in an UPDATE anyway?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

And a SELECT as well. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
aoriano
Participant
Posts: 15
Joined: Fri Apr 25, 2008 8:00 am

Post by aoriano »

I just don't know why there is a select.

As I thought it was suspicious, I checked the option again and it's "Update existing rows only". And How could it be a "Select", there is just an Input Stream connected to my ODBC stage.
Last edited by aoriano on Sun Mar 01, 2009 7:30 am, edited 1 time in total.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

No clue. Suggest you delete the ODBC stage, add it back to the job and see if that straightens things out for you.
-craig

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