I have a sql 2008 R2 problem that I’ve tried to accomplishing using dynamic sql but, no luck yet.
Expand|Select|Wrap|Line Numbers
- Create Table Events (
- PKID int Not Null,
- TimeStamp Datetime,
- EventID int,
- Eventdata int)
- Create Table Eventdatalookup(
- Event int,
- DataLookupTableName varchar(100))
- Create Table TypicalEventDesc1(
- EventData int
- EventDataDesc varchar(100)
- Create Table TypicalEventDesc2(
- EventData int
- EventDataDesc varchar(100)
Events.EventID--- EventDataLookup.Event
Events.EventData—TypicalEventDescX.EventData
The DataLookupTableName Contains the name of the table from which the Events.EventData can be tied to TypicalEventDesc1.EventDataDesc or tied to TypicalEventDesc2.EventDataDesc
Is what I’m wanting to do even possible?