Hello,
I implement a dataStage job to Extract from a Oracle Database. Source is mytable and goal goaltable
The following SQL statement is not working can somebody tell me why:
SELECT
value1, value2, value3, NVL(TRIM(CODE),'UNKNOW'), value4 FROM mytable
Error: goaltable: Not writing to column CODE, and the field does not accept nulls.
mytable: When checking operator: The modify operator has a binding for the non-existent output field " CODE ".
Thanks
Not writing to column: NVL
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
What if you provide an alias name in source.
like
like
Code: Select all
SELECT
value1, value2, value3, NVL(TRIM(CODE),'UNKNOW') CODE, value4 FROM mytable
:D Oh tanks ist's working but why? I dont understand. Now i have the folowing warning:Sainath.Srinivasan wrote:What if you provide an alias name in source.
likeCode: Select all
SELECT value1, value2, value3, NVL(TRIM(CODE),'UNKNOW') CODE, value4 FROM mytable
mytable: When checking operator: When binding output interface field "CODE" to field "CODE": Converting a nullable source to a non-nullable result;
a fatal runtime error could occur; use the modify operator to
specify a value to which the null should be converted.
But in mytable and goaltable the "CODE" is not Nullable
![Question :?:](./images/smilies/icon_question.gif)
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom