Hi, I'm a bit frustrated; I have some code that works which I want to put in a loop, where a variable changes in the WHERE claue, and a variable changes as the file name argument for the INTO clause. It fails on the INTO statement, saying "syntax error". Here's a stripped down version of the code: DECLARE @MgrName varchar(30) DECLARE @MgrFile varchar(30) DECLARE @MgrCount smallint SET @MgrCount = 1 WHILE @MgrCount < 3 BEGIN IF @MgrCount = 1 BEGIN @MgrName = 'MgrOne' @MgrFile = 'dbo.tblMgrOne' END IF @MgrCount = 2 BEGIN @MgrName = 'MgrTwo' @MgrFile = 'dbo.tblMgrTwo' END SELECT REP.RepName INTO @MgrFile FROM dbo.tblRep AS REP WHERE REP.MgrName = @MgrName SET @MgrCount = @MgrCount + 1 END Obviously, I want the reps from MgrOne into tblMgrOne, and the reps from MgrTwo into tblMgrTwo. I have about 50 managers to deal with, I need to update this regularly, and I thought this would be a more elegant solution than cutting and pasting the code 50 times. Eventually, to get the job started, I did that for the first five teams, and that code executed flawlessly, so I know my SELECT, WHERE, etc. code is correct. I actually SELECT a bunch of other columns as well, but that's not where my problem is. I do a lot of coding in Visual Basic, and this type of structure works well. So, I'm confused that when I look into my manual, and all it says for the syntax of INTO is INTO table_name Am I missing something spectacularly obvious here? Or is this just forbidden? Thanks in advance for any help.