how to convert Nvarchar to Numeric
Moderators: chulett, rschirm, roy
how to convert Nvarchar to Numeric
how to convert Nvarchar to Numeric value
In server there are no datatypes internally, they are all stored as characters. So if you mean you want to extract numbers from an alphanumeric string then you can use OCONV with MCN conversion code. If you mean something else then please explain.
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:
If the VarChar contains a valid number, perform some arithmetic, such as adding zero to it.
Code: Select all
If Num(InLink.TheString) Then InLink.TheString + 0 Else InLink.TheString
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.