I have a SQL query that uses GROUP_CONCAT to engage all people with a certain order. Can I find a way in the GROUP_CONCAT field?
SELECT orders.orderID, GROUP_CONCAT (contact first name, "", contact. Unknown) Join attachments in the order of contact (order) contacts .contactID = contacts.contactID GROUP commands by. Order by Order ID orders Order ID DESC
I want to add something like like WHERE attached contacts like '% Eric%'
'Eric' to list the order, but All other contacts are still included in the query.
The query returns data like this: orderID atachedContacts 01 Eric Siegel, John Smith 02 Jason Jackson, Bill O ' Neil 03 Eric Siegel, Jason Jackson, Neal Orion
I want to return the query queues 01 and 03 because 'Eric' is in the contact list.
How can I do this?
Try this:
SELECT orders.orderID, GROUP_CONCAT (contact Join the contacts on contact commands from the contacts added to the first name, "", cont Actions.lastName) Order. Contact = Contacts Order Group by Order. Order DESC Attached is '% Erik%'
Comments
Post a Comment