Home
Blogs
Questions
Jobs
Monetize

Home

About Us

Blogs

Questions

Jobs

Monetize

Post Job

banner

Questions about coalesce

Read more about coalesce

python (12.9k questions)

javascript (9.2k questions)

reactjs (4.7k questions)

java (4.2k questions)

java (4.2k questions)

c# (3.5k questions)

c# (3.5k questions)

html (3.3k questions)

Questions - coalesce

Get all results from the customer table. Replace null values in the state and fax columns with an empty string. How to solve this query?

I am very confused about this question .The thing is know that I can use COALESCE function for this but how ?Because there are 2 columns here ,State and Fax
test-img

Germanjeet Singh

mysql

sql

multiple-columns

coalesce

Votes: 0

Answers: 1

Latest Answer

You can use if null select id,ifnull(state, '') as state ,ifnull(fax, '') as fax from customer
test-img

Nabil

Print from jq using a wild card (or coalesce to first non null)

I have the following command: kubectl get pod -A -o=json | jq -r '.items[]|select(any( .status.containerStatuses[]; .state.waiting or .state.terminated))|[.metadata.namespace, .metadata.name]|@csv' ...
test-img

Vaccano

json

jq

kubectl

coalesce

Votes: 0

Answers: 2

Latest Answer

jq has a counterpart to "coalesce" in the form of //. For example, null // 0 evaluates to 0, and chances are that it will suffice in your case, perhaps: .status.containerStatuses[].state | (...
test-img

peak

Posts

Questions

Blogs

Jobs

The ultimate platform for coders and IT specialists

About

  • Company
  • Support

  • Platform

  • Terms & Conditions
  • Privacy statement
  • Cookie policy
  • Cookie option
  • OnlyCoders © 2025  |  All rights reserved