CAN WE PASS INTEGER COLUMN TO DECIMAL COLUMN IN TRANSFORMATI
Moderators: chulett, rschirm, roy
CAN WE PASS INTEGER COLUMN TO DECIMAL COLUMN IN TRANSFORMATI
WHILE TRANSFORMATIONS IN THE TRANSFORMER STAGE CAN WE PASS INTEGERED COLUMN TO DECIMAL COLUMN.
Panic
DO NOT TYPE IN ALL CAPS. If you do not respect our wishes then leave the web site. I think your attitude is rude. Craig politely asked you not to post in CAPS. You asked questions posting urgent in the topic. We do not make any money answering your questions. When you are rude then it is no longer fun. You will continue to get fewer and fewer answers.
Please try to show some good judgement and be polite and do what is asked or suggested. You will get better answers.
DO NOT TYPE IN ALL CAPS. If you do not respect our wishes then leave the web site. I think your attitude is rude. Craig politely asked you not to post in CAPS. You asked questions posting urgent in the topic. We do not make any money answering your questions. When you are rude then it is no longer fun. You will continue to get fewer and fewer answers.
Please try to show some good judgement and be polite and do what is asked or suggested. You will get better answers.
Mamu Kim
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
What exactly do you mean be an "integered" column?
Integer data types can automatically be promoted to decimal, provided the decimal data type has sufficient precision. For example, the largest legal (four byte) integer has ten digits; therefore, to be able to guarantee that the decimal column can accommodate any possible integer, it needs to have precision of at least 10+x, where x is the scale value. In this case you can guarantee that there will be accurate transfer.
On the other hand, if you have more a priori knowledge about the possible range of values that you may be processing, then a smaller precision may be possible. But if your knowledge turns out to be incorrect, then you risk loss of information in your data flow.
Integer data types can automatically be promoted to decimal, provided the decimal data type has sufficient precision. For example, the largest legal (four byte) integer has ten digits; therefore, to be able to guarantee that the decimal column can accommodate any possible integer, it needs to have precision of at least 10+x, where x is the scale value. In this case you can guarantee that there will be accurate transfer.
On the other hand, if you have more a priori knowledge about the possible range of values that you may be processing, then a smaller precision may be possible. But if your knowledge turns out to be incorrect, then you risk loss of information in your data flow.
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.
error: column mismatch
if column name (varchar) datatype then column name (integer) datatype
else integer (datatype).
i wrote in the transformer stage
If lo.custid Matches ("1970" Or "1971") Then in_data.value Else 0
is it the correct way or not.i have doubt on the quotation marks.
if not suggestions plzz.
thanks
else integer (datatype).
i wrote in the transformer stage
If lo.custid Matches ("1970" Or "1971") Then in_data.value Else 0
is it the correct way or not.i have doubt on the quotation marks.
if not suggestions plzz.
thanks
Server jobs are very gentle with mismatched data types.
Your expression is invalid:
Your expression is invalid:
can be:If lo.custid Matches ("1970" Or "1971") Then in_data.value Else 0
orIf lo.custid = "1970" Or lo.custid = "1971" Then in_data.value Else 0
The difference is that the quotes mean a text equivalency while no quotes tries a numerical equivalency. If the first valid example, 1970.00 will NOT be the same as 1970 whereas in the second example it will. Do the appropriate datatype syntax, else enforce rounding (See OCONV(link.column, "MD??") where ?? performs the appropriate decimal shift and rounding).If lo.custid = 1970 Or lo.custid = 1971 Then in_data.value Else 0
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
kcbland wrote:Server jobs are very gentle with mismatched data types.
Your expression is invalid:
can be:If lo.custid Matches ("1970" Or "1971") Then in_data.value Else 0
orIf lo.custid = "1970" Or lo.custid = "1971" Then in_data.value Else 0
The difference is that the quotes mean a text equivalency while no quotes tries a numerical equivalency. If the first valid example, 1970.00 will NOT be the same as 1970 whereas in the second example it will. Do the appropriate datatype syntax, else enforce rounding (See OCONV(link.column, "MD??") where ?? performs the appropriate decimal shift and rounding).If lo.custid = 1970 Or lo.custid = 1971 Then in_data.value Else 0
And by the way, please stop shouting as well. I agree with Kim 100%.
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle