Link to home
Start Free TrialLog in
Avatar of yossikally
yossikally

asked on

"select into" from joined tables

This must be a very simple question if you have any real experience (obviously I don't)
I have:
  t_player table
  tk_playerTeam table

I want to select records from t_player into t_temp, but only if they do not belong to any team.
So I came up with the following:

select * into t_temp from t_player p
left join tk_playerTeam pt on pt.playerID = p.playerID
where pt.teamID is null

on which I get:
"Column names in each table must be unique...."
I don't want to specify each field from t_player.  All t_player fields must be replicated to t_temp
ASKER CERTIFIED SOLUTION
Avatar of Aneesh
Aneesh
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of yossikally
yossikally

ASKER

that was quick. thanks