I would like to create a field in a query that is the first plus last name with no extra spaces between the names. This is the best that I could come up with but it doesn't work.
SELECT "First" AS "First", "Last" AS "Last", "Dinner--Banquet" AS "Dinner", ("Competitor.First" || ' ' || "Competitor.Last" AS "Name" FROM "Competitor"
I am trying to create a report with name and 'dinner', which is the number of dinners ordered. There should be a line for each record on the report.
I previously did this in dBase Plus but I can't load it onto my new computer so I am starting over with OO Base.
[Solved] Combine first and last name into one field
[Solved] Combine first and last name into one field
Last edited by RBromer on Fri May 31, 2019 6:41 pm, edited 2 times in total.
Ruth Bromer, OpenOffice version 4.1.5, Windows 10
Re: Combine first and last name into one field
This works for me to concatenate the two fields NOMBRE and VALOR with no space between them.
Code: Select all
SELECT "NOMBRE", "VALOR", "NOMBRE" || "VALOR" AS "BOTH" from "Tabla1"
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Re: Combine first and last name into one field
Well, I thought I had tried something like that, but I guess I never saved it and couldn't replicate it. ANyway, thank you. This worked. I even got the space in there. HEre is my command that works.
SELECT "First" AS "First", "Last" AS "Last", "Dinner--Banquet" AS "Dinner", "First" || ' ' || "Last" AS "Name" FROM "Competitor"
Thank you.
SELECT "First" AS "First", "Last" AS "Last", "Dinner--Banquet" AS "Dinner", "First" || ' ' || "Last" AS "Name" FROM "Competitor"
Thank you.
Ruth Bromer, OpenOffice version 4.1.5, Windows 10