Page 1 of 1

How to display multiple columns in a combo box?

PostPosted: Thu Nov 14, 2019 6:28 pm
by Ron19855
Hello,

I seem to be unable to show multiple fields in my combo box. I was able to get my desired outcome in an embedded test db using the following query:
Code: Select all   Expand viewCollapse view
SELECT  DISTINCT "lastname" || ' ' || "firstname" || ', ' || "company" || ', ' || "clientID" FROM "client"
Unfortunatley, when I copy the code to be used in my primary MySQL connected Base doc, only ClientID is displayed. The database structure is identical other than the fact that my test db was embedded and my primary db is not. I've tried slight variations on the query but none have proved fruitful thus far. Any assistance would be greatly appreciated.

Re: How to display multiple columns in a combo box?

PostPosted: Thu Nov 14, 2019 7:03 pm
by UnklDonald418
Perhaps MYSQL doesn't do automatic type conversions, so try
Code: Select all   Expand viewCollapse view
SELECT  DISTINCT "lastname" || ' ' || "firstname" || ', ' || "company" || ', ' || CAST("clientID" AS CHAR)  FROM "client"