Ask Your Question

How Do I Achieve A "Vlookup" In A Base Query? [closed]

asked 2014-09-09 13:56:09 +0200

GreenLED gravatar image

I have a set of contacts in a table. I want to create a field either on the fly or a hrd field that concatinates together certain items using SQL or whatever means that are possible. For example ...

Table 1 Fields - Contact_ID - Contact_FName - Contact_LName - Contact_Address - Contact_City - Contact_State - Contact_Postal - Contact_Phone

Let's assume I want to take make an additional firld called "Contact_Username" and automatically create one based on the information I have (Contact_FName + Contact_LName for simplicity sake). How would I go about that in LibreOffice? I don't care if this field is on the fly or if it's just a field in the actual table as long as it can be updated automatically without me doing anything and as long as I can reference it somewhere else - like say in a query.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2016-03-04 11:11:58.351079

1 Answer

Sort by » oldest newest most voted

answered 2014-09-26 19:38:23 +0200

Goyo gravatar image

Try this:

SELECT *, "Contact_FName" || ' ' || "Contact_LName" AS "Contact_Username" FROM "Table 1"
edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-09-09 13:56:09 +0200

Seen: 190 times

Last updated: Sep 26 '14