I need to start out by apologizing for my ignorance on this, but I'm really supposed to be the network guy here. Anyway... I'm trying to query a couple of tables using inner joins to find who was the person assigned to an item at a specific time the item had a change.
I'd like to try use a declare statement to define a list of names and then let me query run through all the other variables and then select when the user equals one of the users I have listed in my declare.
I thought maybe a table? Here's what I have tried so far with disastrous results.
DECLARE @RG TABLE ( AssignedTo VARCHAR(20))
SET @RG = ('FirstName1.LastName1', 'FirstName2.LastName2', 'FirstName3.LastName3');
DECLARE @RG TABLE (AssignedTo VARCHAR);
INSERT INTO @RG VALUES ('FirstName1.LastName1'), ('FirstName2.LastName2'), ('FirstName3.LastName3');
Can anyone help a noob out here?