assuming I had one table as following:
And I would like to use the following SQL to retrieve a recordset of column names, joined to this table with the correct column being returned.
sysobjects AS O
syscolumns AS C
ON C.id = O.id
dbo.cnf_Attendee AS Data
ON 1 = 1
O.xtype = 'U' AND
O.name LIKE 'cnf_%' AND
C.colid > 1
Currently this would give me a Recordset of:
But if I had the following data inside my cnf_Attendee table:
1, Test1, Test1, firstname.lastname@example.org
2, Test2, Test2, email@example.com
I would like the following data inside my Recordset (after joining the data table):
Is this possible without using a cursor or temporary table?????