I've asked a question( Query with grouped results by column (SQL Server) ) a while back. And got some answers that work on the SQL server, but I can't get them to work as part of a QoQ. Turns out CF has some minor limitation, like not being able to use an INNER JOIN
What I'm trying to achieve, is get a query that can have multiple item names for the same item, but when I'm calling my QoQ, I want it to filter(keep) the items that matches the language ID, if there is one, and default to another one if it is missing.
I'm doing this for several queries, so I'm trying to have the code in a function, where I plug in the query, the uniqueColumn name the languageId.
Because I can't use inner joins and I'm having issues with some of the conditionals, I was thinking of creating a second table which only has the matching languageId and then add the entries that are missing from the other one.
Is there a way to do this in one query?