modify stage error
Moderators: chulett, rschirm, roy
modify stage error
Hi All,
I gave the following expression in modify stage
timestamp1 [:timestamp] = [StringToTimestamp] timestamp
old_columnname is timestamp and its a varchar field but contains timestamp value. So i am converting to timestamp datatype. Am getting the following error.
main_program: Error parsing modify adapter: Error in binding: Error in destination field selector: Expected integer, got: ":"; input:
timestamp1 [:timestamp] = [StringToTimestamp] timestamp
Please help me correcting this syntax .
I gave the following expression in modify stage
timestamp1 [:timestamp] = [StringToTimestamp] timestamp
old_columnname is timestamp and its a varchar field but contains timestamp value. So i am converting to timestamp datatype. Am getting the following error.
main_program: Error parsing modify adapter: Error in binding: Error in destination field selector: Expected integer, got: ":"; input:
timestamp1 [:timestamp] = [StringToTimestamp] timestamp
Please help me correcting this syntax .
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
Re: modify stage error
From what i remember the function is something likedsscholar wrote:I gave the following expression in modify stage
timestamp1 [:timestamp] = [StringToTimestamp] timestamp
TimestampFromString()
Modify stage doesn't take transformer functions.
Priyadarshi Kunal
Genius may have its limitations, but stupidity is not thus handicapped.
Genius may have its limitations, but stupidity is not thus handicapped.
Re: modify stage error
Thanks for the reply. But still getting the same error.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
There are no square brackets around the new data type. These are used only to show optional syntax.
Code: Select all
timestamp1:timestamp = timestamp_from_string(timestamp_string)
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.
Hi ray,
Job ran successfully. But the converted column value is null. The input string is of nvarchar datatype, which i extracted as varchar with unicode from the source itself. After that i placed modify stage to change to timestamp.
Please advise to convert nvarchar to varchar and from varchar to timestamp. Because for remaining columns, i just want to pass as varchar.
Thanks in advance.
Job ran successfully. But the converted column value is null. The input string is of nvarchar datatype, which i extracted as varchar with unicode from the source itself. After that i placed modify stage to change to timestamp.
Please advise to convert nvarchar to varchar and from varchar to timestamp. Because for remaining columns, i just want to pass as varchar.
Thanks in advance.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Source is sql server and the datatype is nvarchar. I use varchar with unicode in datastage source stage. But for all the columns am getting the following warning.. how to eliminate that.
nvarchar in sql server is nothing but varchar with unicode right? I would like to change to varchar. Any conversion needs to be done here.
Thanks in advance.
nvarchar in sql server is nothing but varchar with unicode right? I would like to change to varchar. Any conversion needs to be done here.
Thanks in advance.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: