Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

[Base]: Query give no results by reason of empty or null field

Hello,

I made a sql query with the following suntax:

SELECT CONCAT(`SurName`, ', ', `FirstName`) AS `FullName`, `MemberID` FROM `Members`

The result is a table with two columns: FullName and MemberID In de field Fullname I got the name with the syntax: Johnson, Boris or May, Theresa.

But if the field of the FirstName is empty the field with Fullname is empty. If I have f.e. a space in the field FirstName I will see f.e. Johnson,.

How can I make the SQL Query in this way that I don't need to fill in everywhere a space in a field?

[Base]: Query give no results by reason of empty or null field

Hello,

Used db: mariadb

I made a sql query with the following suntax:

SELECT CONCAT(`SurName`, ', ', `FirstName`) AS `FullName`, `MemberID` FROM `Members`

The result is a table with two columns: FullName and MemberID In de field Fullname I got the name with the syntax: Johnson, Boris or May, Theresa.

But if the field of the FirstName is empty the field with Fullname is empty. If I have f.e. a space in the field FirstName I will see f.e. Johnson,.

How can I make the SQL Query in this way that I don't need to fill in everywhere a space in a field?

[Base]: Query give no results by reason of empty or null field

Hello,

Used db: mariadbmariadb; OS: Windows10 & Xubuntu18.04; LO: 6.3.x

I made a sql query with the following suntax:

SELECT CONCAT(`SurName`, ', ', `FirstName`) AS `FullName`, `MemberID` FROM `Members`

The result is a table with two columns: FullName and MemberID In de field Fullname I got the name with the syntax: Johnson, Boris or May, Theresa.

But if the field of the FirstName is empty the field with Fullname is empty. If I have f.e. a space in the field FirstName I will see f.e. Johnson,.

How can I make the SQL Query in this way that I don't need to fill in everywhere a space in a field?