Error in assignment. SQLSTATE=22005

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
chirag_dg
Participant
Posts: 2
Joined: Mon Oct 16, 2006 11:18 pm

Error in assignment. SQLSTATE=22005

Post by chirag_dg »

There is a simple job.I am trying to create a Hash file. A sequential flat file is input and DB2 table as the lookup.

Director is showing me the error as :

Error in assignment. SQLSTATE=22005
SQLExecute: Error executing statement 'SELECT key1,key2,a,b,c FROM schema.table WHERE key1 = ? AND key2 = ?AND key2 in ('op1', 'op2', 'op3', 'op4')'.

Can anyone help.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

What are you datatypes for key1 and key2 and what is the datatype in your DS job with which you are filling them? For those 2 values of key1 and key2 what happens when you try to manually type in the SELECT clause from the command line and the DB2 command?
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

A quick search on SQLSTATE=22005 will should you that, its due to data type mismatch. The same reason why Arnd asking the question.
Also check if the value that been send for lookup fields (key1 and key2) are of compatiable datatype.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
chirag_dg
Participant
Posts: 2
Joined: Mon Oct 16, 2006 11:18 pm

Post by chirag_dg »

quote="kumar_s"]A quick search on SQLSTATE=22005 will should you that, its due to data type mismatch. The same reason why Arnd asking the question.
Also check if the value that been send for lookup fields (key1 and ...[/quote]

THe job is working now. There was a problem with the source file. There was an extra french character,in the source file i.e. the corrupted dat file which was crreating problem.
Thanks.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Are you saying that there was a French character in the source file that was passed to either key1 or key2? DataStage should have no trouble with this!

However SQL Server may require NVarChar rather than VarChar (or NChar rather than Char) and this may have engendered the data type mismatch error from SQL Server.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply