on 2023 Apr 09 11:55 PM
I have to check the number range for which I have to convert the 18 digit varchar datatype to integer.
Request clarification before answering.
cast (<<your18digitvarchar>>,'int')
Or, to be safe, cast(ltrim_blanks(rtrim_blanks(<<your18digitvarchar>>)),'int')
To be ultra-safe, you could use is the is_valid_int function too.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
74 | |
29 | |
8 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.