I have the column deletedTime in my instances table. Now I want to check in ColdFusion if the value is null. There is only one record to be printed out with the query. IsNull(test) is returning the …
Tag: null
How to ‘create’ NULL data in Teradata SQL for non existing relations
I have 2 tables, one lists features with a feature value that an account might or might not have (TBL_Feat), the other lists the accounts (TBL_Acct). I’m looking for a query to give me all features …
Adding three Integer variable shows result as Null, why?
Here is the code I tried SELECT case when InsertedRows is null then 0 else InsertedRows end InsertedRows ,case when FailedRows is null then 0 else FailedRows end FailedRows ,case when UpdatedRows …
Left join not returning null records
I’am dealing with a pretty basic SQL query, but I cannot understand why the non matching records are not represented with the null values in right table. I have table A and table B with a composite …
mySQL select query does not return results when using a WHERE clause against a NULL column.
I have a single column in a table which looks like this: (field3 is NULL. I use QTODBC7.0 to perform SQL queries, and this application makes NULL fields appear blank in the query results, rather than …
SQL using If Not Null on a Concatenation
If I have the table SELECT (Firstname || ‘-‘ || Middlename || ‘-‘ || Surname) AS example_column FROM example_table This will display Firstname-Middlename-Surname e.g. John–Smith Jane-Anne-Smith …
Check if NULL exists in Postgres array
Similar to this question, how can I find if a NULL value exists in an array? Here are some attempts. Only a trick with array_to_string shows the expected value. Is there a better way to test this? Answer Postgres 9.5 or later Or use array_position(). Basically: See demo below. Postgres 9.3 or later You can test with the built-in functions
null value in column “last_login” violates not-null constraint
Having issues getting rid of this error. I’m trying to use Digital Ocean to deploy my Django app. I configured Postgres, but when I’m trying to register a new user in my app, I get this problem. I’…
How to set to NULL a datetime with 0000-00-00 00:00:00 value?
I need to change a few values on my DB. I forgot to set nullable to the table and it set to 0000-00-00 00:00:00 by default. Now I need to convert that value in NULL. The field type is Datetime. How can I do it? I try with the typical Update table set field = NULL WHERE field = ‘0000-00-00
How to return a value from a function if no value is found
I’m attempting to return 0.0 if the following function does not return anything: I’ve tried searching for it and found that COALESCE does not work. Does anyone have any ideas how to solve this? Table structure: Example data: Answer Here is the script I used. As you can see I run PostgreSQL 9.4.1. I used HeidiSQL to launch the queries.