The Forum has been Updated
        The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
    
                        OK, bare with me here, my brain's a bit mushy at the moment!
Say, for example, I have a table (ONE) with 5 records in it, each with a unique ID. In another table (TWO) I have some records, each with 5 columns. Using those 5 columns in TWO, I want to select the information from ONE ordering it by the order of the columns in TWO.
So my tables would be:And my query would be:And I want the returned recordset to be in the order:
<edit>Figured it out - forgot I'd managed to achieve this before using MySQL's "FIELD" function. So now my query looks like this:And returns the recordset in the desired order. Huzzah! 
</edit>
                            
                    
                Say, for example, I have a table (ONE) with 5 records in it, each with a unique ID. In another table (TWO) I have some records, each with 5 columns. Using those 5 columns in TWO, I want to select the information from ONE ordering it by the order of the columns in TWO.
So my tables would be:
Code:
ONE
---
ID	FIELD
1	abc
2	def
3	ghi
4	jkl
5	mno
TWO
---
ID	COL1	COL2	COL3	COL4	COL5
1	3	1	2	5	4Code:
SELECT O.FIELD FROM ONE O,TWO T WHERE O.ID IN (T.COL1,T.COL2,T.COL3,T.COL4,T.COL5) AND T.ID=1- ghi
 - abc
 - def
 - mno
 - jkl
 
<edit>Figured it out - forgot I'd managed to achieve this before using MySQL's "FIELD" function. So now my query looks like this:
Code:
SELECT O.FIELD FROM ONE O,TWO T WHERE O.ID IN (T.COL1,T.COL2,T.COL3,T.COL4,T.COL5) AND T.ID=1 ORDER BY FIELD(O.ID,T.COL1,T.COL2,T.COL3,T.COL4,T.COL5)
    