Concatination Problem for Tab delimited file
Moderators: chulett, rschirm, roy
Concatination Problem for Tab delimited file
Hi All,
I have two columns comming from a Tab delimited file.One of them is Reference(Varchar) where the other is Rate( Float.)
My requirement is to concatenate them and put in to a Varchar field(Oracle).
example data: REFERENCE
prime
split
YRP
Nkl
rto
RATE
20.2
0.5
0.5
etc.......
i am able to concatenate them both, but it is not giving results if the rate column is empty.Also i have written a small routine to give @null as well empty('') exceptions.But still the the result is not there for where ever there is a null in the rate field.
i.e the end result is like this
prime 20.2
split 0.5
YRP 0.5
.........
.........
........
the dotted lines i represent means there is no data in the resultant column. is there any thing i am missing?
Version 7.5.1 server
Any help is appriciated.
I have two columns comming from a Tab delimited file.One of them is Reference(Varchar) where the other is Rate( Float.)
My requirement is to concatenate them and put in to a Varchar field(Oracle).
example data: REFERENCE
prime
split
YRP
Nkl
rto
RATE
20.2
0.5
0.5
etc.......
i am able to concatenate them both, but it is not giving results if the rate column is empty.Also i have written a small routine to give @null as well empty('') exceptions.But still the the result is not there for where ever there is a null in the rate field.
i.e the end result is like this
prime 20.2
split 0.5
YRP 0.5
.........
.........
........
the dotted lines i represent means there is no data in the resultant column. is there any thing i am missing?
Version 7.5.1 server
Any help is appriciated.
Usually checking for null from a flat file is hard unless it has the control character ^@ which represents a null. Usually flat files dont have such un-printable characters or they are stripped implicitly. Thats why a null check wont work even though to a naked eye it does look like null. Thats where the len() functions really helps to see if the length is 0.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You can not sensibly perform comparisons with @NULL (the unknown value); the answer can only be "don't know".
I have an object in each of my hands. Please answer the following questions.
1. Are they the same?
2. Are they different?
3. Which one is larger?
See what I mean? Use the IsNull() function to answer the question "is this value null?".
I have an object in each of my hands. Please answer the following questions.
1. Are they the same?
2. Are they different?
3. Which one is larger?
See what I mean? Use the IsNull() function to answer the question "is this value null?".
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.
-
- Charter Member
- Posts: 36
- Joined: Thu Jun 10, 2004 11:22 pm
NullToEmpty
I think you can use this function:
NullToEmpty(inlink.Premium) : NullToEmpty(inlink.RATE)
NullToEmpty(inlink.Premium) : NullToEmpty(inlink.RATE)