I tried with a sample test the following
First i took a column name: Col1
Data type: Decimal
Data length: 15
First Stage variable name SONE: DecimalToString(DSLink4.Col1)
Second stage variavle name STWO: Length(SONE)
Third stage variable name STHREE: STR('0',9 - STWO)
The valus is passed to the target column name is FCol1
Data type: Varchar
Data lenth:30
i am getting the following output
source input:
123
target
000000000000123
It is not giving the actual result... what ever the input value ///it is reading and giving as an output...
the source column length is 15.. thats way it is giving 15 lenth...
i want only 9 lenth ....which is minus with the length of the column
i tried will all the options... this is immedeiate requirement to the client ... i am very new to parallel .... please help me on this
Thanks
Suresh
fmt FROM SERVER TO PARALLEL
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 160
- Joined: Tue May 02, 2006 7:49 am
I tried with a sample test the following
First i took a column name: Col1
Data type: Decimal
Data length: 15
First Stage variable name SONE: DecimalToString(DSLink4.Col1)
Second stage variavle name STWO: Length(SONE)
Third stage variable name STHREE: STR('0',9 - STWO)
The valus is passed to the target column name is FCol1
Data type: Varchar
Data lenth:30
i am getting the following output
source input:
123
target
000000000000123
It is not giving the actual result... what ever the input value ///it is reading and giving as an output...
the source column length is 15.. thats way it is giving 15 lenth...
i want only 9 lenth ....which is minus with the length of the column
i tried will all the options... this is immedeiate requirement to the client ... i am very new to parallel .... please help me on this
Thanks
Suresh
First i took a column name: Col1
Data type: Decimal
Data length: 15
First Stage variable name SONE: DecimalToString(DSLink4.Col1)
Second stage variavle name STWO: Length(SONE)
Third stage variable name STHREE: STR('0',9 - STWO)
The valus is passed to the target column name is FCol1
Data type: Varchar
Data lenth:30
i am getting the following output
source input:
123
target
000000000000123
It is not giving the actual result... what ever the input value ///it is reading and giving as an output...
the source column length is 15.. thats way it is giving 15 lenth...
i want only 9 lenth ....which is minus with the length of the column
i tried will all the options... this is immedeiate requirement to the client ... i am very new to parallel .... please help me on this
Thanks
Suresh
Suresh - I am going to give up soon; I don't understand what you are doing or saying and it seems that you haven't done what I asked, but are posting other output.
Please do one thing - if your input column DSLink4.test1 is of a number type then please do NOTHING except this derivation to a VarChar(10) column:
please note - no stage variables, no other derivations. Just this code and writing to a VarChar(10) column.
Please do one thing - if your input column DSLink4.test1 is of a number type then please do NOTHING except this derivation to a VarChar(10) column:
Code: Select all
STR('0',9 - Len(DecimalToString(DSLink4.test1))):DecimalToString(DSLink4.test1)
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>