Questions tagged [isnull]

`ISNULL` is a proprietary SQL function that replaces NULL with the specified replacement value.

ISNULL is a SQL function that replaces NULL with the specified replacement value.

The ANSI/ISO SQL standard function COALESCE serves the same purpose, and is widely implemented.

Reference

MSDN Article

706 questions
-2
votes
1 answer

SQL Server - fill NULL row values with certain logic

I've got a PIVOT table output in SQL Server Management Studio. Every row contains data that are either filled or NULL. I need to fill the NULL values according to the following logic: If value is NULL, then go further to the left (in the row) and…
Dave
  • 97
  • 1
  • 8
-2
votes
1 answer

Python: replace nulls with 0

What is the best way to replace all the null "NaN" values in a Python dataframe with the value 0? Also, is it possible to do this with a for loop?
-2
votes
2 answers

Check if all of the values of a multidimensionnal array is null

I've a multidimensionnal array like that, and I wan't to check if all of the "open_at" and "closed_at" values are NULL. array:7 [▼ 0 => array:2 [▼ 0 => array:2 [▼ "open_at" => null "closed_at" => "11:03" ] 1 => array:2 [▼ "open_at" =>…
Newo1t
  • 1
  • 1
-2
votes
1 answer

laravel sql update isnull with parameters variables

$variable = array("apple" , "orange" , null, "apple2"); DB::statement("UPDATE table1 SET field1= IsNull($variable[0],field1), field2=…
Robin Vlaar
  • 27
  • 1
  • 7
-2
votes
1 answer

Check for value is N/A

I am integrating an API and in some cases bonus field return value N/A and I want not to show N/A on the page.If the field has any text other than N/A then it shows the text. I tried this: if(trim($value) != "N/A" && !is_null($value)) { …
dev tester
  • 327
  • 1
  • 10
  • 25
-2
votes
2 answers

SQL multiple Case when statement

I am trying to execute the below query. SELECT ABL.Address1 AS BillingAddress1, ABL.Address2 AS BillingAddress2, ABL.Address3 AS BillingAddress3, ABL.Address4 AS BillingAddress4, ABL.UnitNumber AS BillingUnitNumber, ABL.City AS…
unnikrishnan
  • 141
  • 2
  • 3
  • 15
-2
votes
1 answer

need help, bug in query select with isnull

i think this can be a bug in yii2, when i use: $query->select ("isnull(cba.HSLET,0)"); $query->join('INNER JOIN','cba','cba.id = regverification.cba_id'); yii miss create the sql sentence resulting in a error near: isnull(cba.HSLET, [0)]
Yordankis
  • 93
  • 7
-2
votes
2 answers

SQL Server - Query Joins using Case or IsNull

I had a scenario which I need to write a query. I had a Query1 which return hundreds of records with these four column names (batch_no, batch_name, class_no, class_name) based on some joins. I need to write a final query (Query2) to return columns…
user4872443
-2
votes
1 answer

Using ISNULL function is not giving proper value

I am working with one query in MSSQL like this: select company_id,isshowable from company where company_id in (1,2); It will give results like: company_id | isshowable 1 | NULL 2 | true Here, company_id 1 has…
Mitul Chauhan
  • 49
  • 1
  • 2
  • 9
-2
votes
1 answer

Most powerful way to select MySql data if result is null

I would ask what is the best and most powerful way to extract data from two mysql tables based on certain filters and, if the result is null, extract data without conditions? table user ID NAME SURNAME 1 nick smith 2 …
George_p
  • 25
  • 1
  • 7
-2
votes
1 answer

Why do these queries return differently?

I am working on a query which I am updating a user defined table that always has 1 row (it's part of a much larger operation). This table is populated by querying from a larger employee table based on employee ID. This query is working most of the…
-2
votes
2 answers

How to convert Null Date into Blank?

I have a table which I'd like to convert Null Date (my date format i.e 2014-02-12) to blank string but an error occurs whenever I do IsNull, I have mysql. Is there away to do it with isnull?
-2
votes
2 answers

Incorporating ISNULL into a CASE expression

I have the following CASE expression and the ISNULL portion is not registering: CASE WHEN IsNull(2010) THEN 0 END) * CASE WHEN IsNumeric([Dur_In_Hours]) = 1 THEN CAST([Dur_In_Hours] AS FLOAT) ELSE 0 END) AS Cost
Andrew
  • 65
  • 1
  • 9
-2
votes
1 answer

What is wrong with my code? (Update next column if previous column is not null)

I recently started working with PHP and MySQL and I have written a code to insert a variable into a MySQL column and if this column is already filled (Not NULL) that it would then continue on and try to update the next column. Here is my…
user1760791
  • 403
  • 3
  • 12
-3
votes
2 answers

How to understand "!string.IsNullOrWhiteSpace(s)" syntax?

Well, I know in fact that "!" means NOT, and I quite understand the "IsNullOrWhiteSpace" function destination. But once upon, when I surfed through the Internet in terms of finding how to delete whitespaces, I've faced that kind of syntax: if…
dima_mayd
  • 55
  • 8
1 2 3
47
48