Création
d'une offre d'échange : sélection du correspondant
SELECT adh_pseudo, adh_code_postal,adh_nochrono,
(SELECT count(manques.dallay) from france, rubriques, manques
inner Join doubles on (manques.dallay=doubles.dallay)
where manques.no_adherent = #Session.NoMembre# and doubles.no_adherent = adh_nochrono
and manques.dallay = france.dallay and france.rubrique=rubriques.coderubrique) as nbdoubles,
(SELECT coalesce(sum(note) ,0) from evenements where nomembre=adh_nochrono and note > 0) as notepos,
(SELECT coalesce(sum(note) ,0) from evenements where nomembre=adh_nochrono and note < 0) as noteneg
from membres where adh_nochrono in
(
SELECT distinct c.no_adherent from doubles a inner Join manques c on (a.dallay=c.dallay)
where a.no_adherent = #Session.NoMembre# and a.no_adherent <> c.no_adherent
and ((a.neufs_sc >0 and c.neuf >0) or (a.neufs_ac >0 and c.nac >0) or (a.neufs_sg >0 and c.nsg >0) or (a.obliteres >0 and c.oblitere >0) or (a.surlettre >0 and c.surlettre >0))
and c.no_adherent in
(
SELECT distinct d.no_adherent from manques e inner Join doubles d on (e.dallay=d.dallay)
where e.no_adherent = #Session.NoMembre# and e.no_adherent <> d.no_adherent
and ((d.neufs_sc >0 and e.neuf >0) or (d.neufs_ac >0 and e.nac >0) or (d.neufs_sg >0 and e.nsg >0) or (d.obliteres >0 and e.oblitere >0) or (d.surlettre >0 and e.surlettre >0))
)) and adh_actif = 'O'
and adh_region = #Region#
and adh_departement = '#Departement#'
and adh_pseudo = '#Pseudo#'
and membres.adh_pseudo in (Select favoris.favoris from favoris where favoris.no_adherent = #Session.NoMembre#)
order by nbdoubles
|
Résultat de la recherche :
|
Pseudo (Dept)
|
Note
+/- |
Doubles |
#adh_Pseudo# (#left(adh_Code_Postal,2)#) |
+#numberformat(AbonnesQuery.Notepos)# / -#numberformat(AbonnesQuery.Noteneg)#
|
#AbonnesQuery.NbDoubles# |
|
|
|