Hi,
If a value in a column is not a numeric ,i need to convert it to Sting 'NULL' .How can we implement this is effective way.mysource is csv file.
Please advice
Numeric check & conversion
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Depends. What is your definition of "numeric"? Does it include all of the following?
24
17.32
-8.92
6.023E23
-1.551E-15
You can use an appropriate testing function, perhaps Num() to determine whether the string (note, not "sting") is numeric based on your rules, within an If..Then..Else construct, and use SetNull() to generate the null if required.
24
17.32
-8.92
6.023E23
-1.551E-15
You can use an appropriate testing function, perhaps Num() to determine whether the string (note, not "sting") is numeric based on your rules, within an If..Then..Else construct, and use SetNull() to generate the null if required.
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.