DB2 UDB Loading Error
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 251
- Joined: Tue Dec 02, 2008 3:09 pm
-
- Participant
- Posts: 251
- Joined: Tue Dec 02, 2008 3:09 pm
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The only solution is GET IT RIGHT.
The SQL must refer to precisely the correct number of columns with correct (compatible) data types as are specified in the stage's metadata.
The SQL must refer to precisely the correct number of columns with correct (compatible) data types as are specified in the stage's metadata.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 251
- Joined: Tue Dec 02, 2008 3:09 pm
Thank you very much for your help ray and chulett
actually when i try to run the job with auto generated sql records are loading into db2 database but when i am trying to create user define sql it is not loading. Atleast i am able to load the data. Still i am little bit confused why it is not working properly i have checked datatypes and length of the datatype for target database they all are same.
any how atleast i can load the data i am marking this issue as resolve
hopefully by soometime i will resolve the issue with user define sql
actually when i try to run the job with auto generated sql records are loading into db2 database but when i am trying to create user define sql it is not loading. Atleast i am able to load the data. Still i am little bit confused why it is not working properly i have checked datatypes and length of the datatype for target database they all are same.
any how atleast i can load the data i am marking this issue as resolve
hopefully by soometime i will resolve the issue with user define sql
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Only you can resolve the "issue". You have created user-defined SQL that does not use the same number of columns as in your metadata.
In particular, if your SQL generates the key value (for example using a database sequence), then the key column should not appear in the metadata. The metadata (column definitions) define the number of values that will be delivered to supply values to parameter markers in the SQL.
In particular, if your SQL generates the key value (for example using a database sequence), then the key column should not appear in the metadata. The metadata (column definitions) define the number of values that will be delivered to supply values to parameter markers in the SQL.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
suneelchallagali wrote:ok chulett i wont use user define sql
So... when this happened you were NOT using auto-generated sql as was discussed? This was from yet another user-defined attempt?suneelchallagali wrote:Hey chulett i have replace the db2 udb stage with new one and run the job but i am getting same error
APT_CombinedOperatorController,0: Fatal Error: Fatal: This SQL statement did not contain the same number of parameters as columns on this link. This usually happens with user-defined SQL
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 251
- Joined: Tue Dec 02, 2008 3:09 pm
actually i tried with both of them user define and as well as auto generated sql but i am getting the same error as you mention then i have restart the system and created the new job and selected auto generated job. then it is working fine, after that then i check with user define sql it is not working. But for now auto generated sql is working fine.