Link to home
Create AccountLog 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
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of yossikally
yossikally

ASKER

that was quick. thanks