Span for padding a substring must be non-negative: 0. No pad
Posted: Thu Apr 22, 2010 3:30 am
hi All,
I have a cloumn called state whose datatype[varchar] length[2]
i have following job:
Oracle enterprise>>>> transformer>>>sequential stage
in transformer i am padding the columns with spaces to create a fixed length record
something like
if IsNull(lnk_db_xfm.State) then PadString(""," ",2) else PadString(lnk_db_xfm.State," ",2-Len(lnk_db_xfm.State))
Other columns works fine but for above column i am getting warnings
Span for padding a substring must be non-negative: 0. No pad
I tried following:
1) checked the length of the state using length function it's 2
2) used if IsNull(lnk_db_xfm.State) then PadString(""," ",2) else PadString(lnk_db_xfm.State," ",0) to check whether v get warnings with ocurence length '0'-- result is no warnings.
3) i tried if IsNull(lnk_db_xfm.State) then PadString(""," ",2) else PadString(lnk_db_xfm.State," ",2-Len(trim(lnk_db_xfm.State))) i tried trim function before getting the length -- result no warnings
The output column is for state is also varchar[2]
Can anyone explain whats happening here!!
I have a cloumn called state whose datatype[varchar] length[2]
i have following job:
Oracle enterprise>>>> transformer>>>sequential stage
in transformer i am padding the columns with spaces to create a fixed length record
something like
if IsNull(lnk_db_xfm.State) then PadString(""," ",2) else PadString(lnk_db_xfm.State," ",2-Len(lnk_db_xfm.State))
Other columns works fine but for above column i am getting warnings
Span for padding a substring must be non-negative: 0. No pad
I tried following:
1) checked the length of the state using length function it's 2
2) used if IsNull(lnk_db_xfm.State) then PadString(""," ",2) else PadString(lnk_db_xfm.State," ",0) to check whether v get warnings with ocurence length '0'-- result is no warnings.
3) i tried if IsNull(lnk_db_xfm.State) then PadString(""," ",2) else PadString(lnk_db_xfm.State," ",2-Len(trim(lnk_db_xfm.State))) i tried trim function before getting the length -- result no warnings
The output column is for state is also varchar[2]
Can anyone explain whats happening here!!