Skip to main content
0 votes
0 answers
58 views

Make a WHERE clause Non-Sargable and remove ISNULL [duplicate]

Is there a better way to represent this WHERE clause so is does not use the Non-SARGable funtion ISNULL? 1=1 AND ISNULL([TABLE_NAME_1].[FIELD_NAME_1], -1) <> ISNULL([TABLE_NAME_2].[...
Simon's user avatar
  • 401
0 votes
1 answer
68 views

Query, giving back string, even if SELECT statement is empty, is faulty

simple question, but no idea, how to fix it. Following Query should give back "No values", if SELECT Part will return nothing. I will get error message: [21000][1241] (conn=80188403) Operand ...
user24710148's user avatar
1 vote
1 answer
535 views

Is there a function to return the first null value of a row?

I have the following table: create table table1 ( id serial, workdate date, tanknum1 integer, tanknum2 integer, tanknum3 integer, tank1startingvalue float, ...
lamarcondes16's user avatar
0 votes
2 answers
1k views

Convert date, turn NULLS blank and keep blanks?

I have a column in a query that contains some blanks, NULLS and dates (as YYYYMMDD). I need to convert the dates to MM/DD/YYYY, remove the NULLs and keep the blanks blank. When I try... isnull(convert(...
Hillary Haskins's user avatar
-2 votes
2 answers
645 views

How to use ISNULL result in a calculation involving a subquery [closed]

I have a SQL script that uses a subquery, the result of the subquery can sometimes be NULL so I've used ISNULL to set the result to zero (0) in those cases. The problem I have to solve is that I need ...
adhocEY's user avatar
  • 95
0 votes
1 answer
591 views

PostgreSQL ISNULL transform null to minimum value of datatype

I have a PostgreSQL database and I have a complex query which is generated dynamically from C#. I need to use the ISNULL built-in function which in PostgreSQL is called COALESCE by replacing with ...
Stavros Koureas's user avatar
-1 votes
1 answer
91 views

How to handle null values in date field in sql pgadmin

I need to find difference between two dates to calculate "total storage days" in pgadmin date1-date2=total storage days The date values is having null values, if i use isnull(date1,0) ERROR:...
Ramya V's user avatar
0 votes
2 answers
461 views

Mysql query with optional where condition

I have a form which is used to search the database. The form consists of four fields, including two date fields: (Col1, Col2, Datefm, DateTo). Users have the option to fill the values in these fields. ...
leraner's user avatar
  • 65
0 votes
1 answer
95 views

comparison with NULL date gives NULL value in SQL Server

This code results in NULL. sale_jan_dt and sale_feb_dt both datetime columns. s.sale_feb_dt = 2022-09-01 01:19:00.000 s.sale_jan_dt = NULL select case when s.sale_jan_dt >= s....
User12345's user avatar
-2 votes
2 answers
83 views

Is there a way to return a value instead of blank for SQL? [closed]

I am trying to do a HTML table but i am having troubles where it does not return a value. This example shows my result.Sample Image Is it possible to script that if there isnt any result, it will ...
Rickyc's user avatar
  • 11
-1 votes
1 answer
69 views

mysql group_concat problem: ISNULL replaces null values but in the incorrect order

When using GROUP_CONCAT, the ORDER BY clause appears to works correctly. However, when replacing NULL values using ISNULL or COALESCE, although the actual values are in order, the NULL values all end ...
WaterNotWords's user avatar
1 vote
2 answers
437 views

Excel - total count of records where all 3 columns of data are blank

I'm trying to create a formula that provides the total count of records in column A that either have a null or 0 across all 3 columns. Ex Name Score1 Score2 Score3 Test A Test B 90 Test C ...
madQuestions's user avatar
1 vote
1 answer
433 views

How to make pandas interpret NA as null but only for some of the selected columns?

I have a dataset with more than 40 columns and for some of the columns 'NA' is a valid entry which means 'Not Applicable'. But for rest of the columns 'NA' can be considered as NULL. Currently pandas ...
user21302287's user avatar
0 votes
2 answers
1k views

Different results from any(df.isnull()) and pd.isnull(data).any()

I am using the standard Boston houses data frame with pandas and I have noticed something that bugs me: when I'm checking for missing values in 2 different ways - I'm getting 2 different results, ...
tensai's user avatar
  • 81
1 vote
1 answer
81 views

Update procedure with case - SQL SERVER

i would like to request help with an update procedure. I want to update either the CPF field only or the Surname field only, currently, i can only update both together. Is there any way to do this ...
Lucas César's user avatar

15 30 50 per page
1
2 3 4 5
47