Created
February 23, 2014 01:42
-
-
Save 00krishna/9165405 to your computer and use it in GitHub Desktop.
Postgresql: if you are trying to convert a string to an integer, be careful of nulls. Here is a postgres solution.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
NULLIF(your_value, '')::int |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment