Questions tagged [isnull]

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

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

Reference

MSDN Article

637 questions
-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
  • 39
  • 1
  • 1
  • 8
-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

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
  • 67
  • 1
  • 8
-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
  • 393
  • 2
  • 11
-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
  • 7
-6
votes
1 answer

Replaces Nulls with 0 without using a function?

I want to replace null values in a table but without using a function such as isnull because its dealing with a large amount of data and slowing it down. everywhere online says isnull and coalesce but is there any way without using such functions. I…
rkyyk
  • 153
  • 2
  • 5
  • 13
1 2 3
42
43