lcMyTable = "Users" lcUser = "Christian" SELECT * FROM (lcMyTable) WHERE Username = lcUserIn SQL that approach gives me problems, it either says "Must declare the table variable" or if I used a dynamic SQL Must delcare the scalar variable". I guess there is a simple approach but I just can't figure out what is the right one.