-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Columns with NUMERIC datatype do not return any value in the query #50
Comments
|
but who has tables with thousands of data with the field NUMERIC and needs to access how to do without converting the tables Does using a CAST work? did anyone get an easy solution? dario |
Casting to and from string usually worked for me. Maybe the (somewhat new?) |
Numeric can have a decimal component. NUMERIC(12,2) for example. |
what about timestamp? how do i return timestamp without time zone using casting? ::timestamp doesn't seem to work? |
I have encountered similar issue when I was working with graphql + ferry lib. |
Consider the following columns and respectives datatypes on table auge_objective.measures:
id VARCHAR,
name VARCHAR,
start_value NUMERIC,
end_value NUMERIC,
current_value NUMERIC
When the query is executed the following way, the NUMERIC columns don't return nothing.
"SELECT id, name, start_value, end_value, current_value FROM auge_objective.measures ";
But if it's used cast to REAL, the query returns with right values. It´s works!
"SELECT id, name, start_value::REAL, end_value::REAL, current_value::REAL FROM auge_objective.measures ";
The text was updated successfully, but these errors were encountered: