Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- INSERT INTO fhc_hockey_league_schedule (season_id, league_id, datum, zeit, home_team_id, away_team_id, game_venue_id)
- SELECT
- 2 as season,1 as league,
- ter.datum,
- ter.zeit,
- cht.team_id as home,
- cat.team_id as away,
- cht.team_game_venue
- FROM tmp_termine ter
- JOIN fhc_hockey_club hc
- on hc.club_name=ter.home
- join fhc_hockey_club_team cht
- on cht.club_id = hc.club_id
- JOIN fhc_hockey_club ac
- on ac.club_name=ter.away
- join fhc_hockey_club_team cat
- on cat.club_id = ac.club_id
- ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement