comparison Agendas/trunk/db/v1.0/01 - Ponentes.sql @ 238:b43dc14886e3

Quitando ponente principal de la UI
author nelopauselli
date Tue, 04 Oct 2011 21:59:40 -0300
parents c61954d24c8c
children
comparison
equal deleted inserted replaced
237:51faeabfb9d9 238:b43dc14886e3
9 constraint PK_Ponentes primary key(evento_key, elt), 9 constraint PK_Ponentes primary key(evento_key, elt),
10 constraint FK_Ponentes_Evento foreign key (evento_key) references Evento, 10 constraint FK_Ponentes_Evento foreign key (evento_key) references Evento,
11 constraint FK_Ponentes_Persona foreign key (elt) references Persona) 11 constraint FK_Ponentes_Persona foreign key (elt) references Persona)
12 end 12 end
13 go 13 go
14
15 insert into Ponentes (evento_key, elt)
16 select e.Id, e.Ponente
17 from Evento e
18 where e.Ponente is not null and e.Ponente not in (select p.elt from Ponentes p where p.evento_key = e.Id)
19 go