Ustring to string
Moderators: chulett, rschirm, roy
Ustring to string
Silly of me, to even ask this question. However, I am stuck in converting a Varchar(unicode) to a date.
I am doing a lookup on ID and pulling out Birthdate,Firstname, Lastname etc.
I see that 4 records are getting rejected with Birthdate("**********")
After a pain staking effort, I realised, there are two unmatched columns, which outputs this ("**********").
However, there is one other record, with a match also giving out the same result.(Note: this Id has duplicates)
Derivation: stringtodate(lnk.Birthdate,"%mm-%dd-%yyyy")
Any suggetions on how to get rid of this ("**********")??
Thanks!
I am doing a lookup on ID and pulling out Birthdate,Firstname, Lastname etc.
I see that 4 records are getting rejected with Birthdate("**********")
After a pain staking effort, I realised, there are two unmatched columns, which outputs this ("**********").
However, there is one other record, with a match also giving out the same result.(Note: this Id has duplicates)
Derivation: stringtodate(lnk.Birthdate,"%mm-%dd-%yyyy")
Any suggetions on how to get rid of this ("**********")??
Thanks!
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
My source is not a flat file. Its a DataSet. And even after trimming it still gives me the same result.
Job Design:
DS
DS---->LKP---->Trnsfrmr---->Seq File
Performing a lookup based on a ID. Which found no match for 3 ID's And since I am using a lookup, will output Nulls for those records.
Issue: With Date Field.[Source Format- mm/dd/yyyy)
Source(Varchar-Unicode)---->Target(Date)
Using the following derivation:
StringToDate(UStringToString(Trim(DSLink12.BIRTH_DT)) ,"%mm-%dd-%yyyy")
Transformer_45,1: Numeric string expected of the appropriate decimal precision . Use default value.Numeric string expected of the appropriate decimal precision . Use default value.
Transformer_45,0: Conversion error calling conversion routine date_from_string data may have been lost
Transformer_45,0: Conversion error calling conversion routine date_from_ustring data may have been lost
Peek_56,0: BIRTH_DT:**********
Peek_56,0: BIRTH_DT:**********
Peek_56,0: BIRTH_DT:**********
Job Design:
DS
DS---->LKP---->Trnsfrmr---->Seq File
Performing a lookup based on a ID. Which found no match for 3 ID's And since I am using a lookup, will output Nulls for those records.
Issue: With Date Field.[Source Format- mm/dd/yyyy)
Source(Varchar-Unicode)---->Target(Date)
Using the following derivation:
StringToDate(UStringToString(Trim(DSLink12.BIRTH_DT)) ,"%mm-%dd-%yyyy")
Transformer_45,1: Numeric string expected of the appropriate decimal precision . Use default value.Numeric string expected of the appropriate decimal precision . Use default value.
Transformer_45,0: Conversion error calling conversion routine date_from_string data may have been lost
Transformer_45,0: Conversion error calling conversion routine date_from_ustring data may have been lost
Peek_56,0: BIRTH_DT:**********
Peek_56,0: BIRTH_DT:**********
Peek_56,0: BIRTH_DT:**********
If I use just StringToDate(DSLink12.BIRTH_DT,"%mm-%dd-%yyyy") I get the below output.
Peek_56,1: BIRTH_DT:1992-02-21
Peek_56,1: BIRTH_DT:1959-12-21
Peek_56,1: BIRTH_DT:**********
Peek_56,1: BIRTH_DT:1989-12-12
Peek_56,1: BIRTH_DT:1963-11-11
Peek_56,1: BIRTH_DT:1960-08-28
Peek_56,1: BIRTH_DT:1948-07-27
I need all the records as I have to insert them as new records into the table and update the existing one's.
Any help will be appreciated. Thanks!!
Peek_56,1: BIRTH_DT:1992-02-21
Peek_56,1: BIRTH_DT:1959-12-21
Peek_56,1: BIRTH_DT:**********
Peek_56,1: BIRTH_DT:1989-12-12
Peek_56,1: BIRTH_DT:1963-11-11
Peek_56,1: BIRTH_DT:1960-08-28
Peek_56,1: BIRTH_DT:1948-07-27
I need all the records as I have to insert them as new records into the table and update the existing one's.
Any help will be appreciated. Thanks!!