Ajout
This commit is contained in:
parent
0b493221fe
commit
36ed0557c0
@ -1,5 +1,4 @@
|
||||
|
||||
|
||||
#############################################################################
|
||||
# Documentation
|
||||
# =============
|
||||
@ -32,8 +31,8 @@
|
||||
# adr_ville => Ville
|
||||
# adr_dep => Departement (Corse 2A,2B => 201, 202)
|
||||
# adr_com
|
||||
# tel => IF(tel=='0000000000',0,1) AS pTel
|
||||
# fax => IF(fax=='0000000000',0,1) AS pFax
|
||||
# tel => IF(tel>0,1,0) AS pTel
|
||||
# fax => IF(fax>0,1,0) AS pFax
|
||||
# cj => Texte
|
||||
# capital => Float
|
||||
# capitalDev
|
||||
@ -73,11 +72,11 @@
|
||||
# dirPrenom
|
||||
# dirDateNaiss
|
||||
# dirFct
|
||||
# nbEtab => nbEtab
|
||||
# nbEtab => Nombre d'établissement
|
||||
# nbMPubli
|
||||
# sirenGrp => IF(pSirenGrp=='0',0,1) AS pSirenGrp
|
||||
# nbActio =>
|
||||
# nbPart =>
|
||||
# sirenGrp => IF(pSirenGrp>0,1,0) AS pSirenGrp
|
||||
# nbActio => Entier => Nombre d'actionnaires (actio,bool)
|
||||
# nbPart => Entier => Nombre de participations (part, bool)
|
||||
# bilType =>
|
||||
# bilAnnee =>
|
||||
# bilCloture =>
|
||||
@ -122,9 +121,9 @@ source ciblage
|
||||
sql_query = \
|
||||
SELECT LPAD(siren, 9, '000000000') AS siren, LPAD(nic, 5, '00000') as nic \
|
||||
actif, siege, \
|
||||
adr_dep, \
|
||||
IF(tel=='0000000000',0,1) AS tel, \
|
||||
IF(fax=='0000000000',0,1) AS fax, \
|
||||
REPLACE(REPLACE(adr_dep, '2B', 200), '2A', 200) AS adr_dep, \
|
||||
IF(tel>0,1,0) AS tel, \
|
||||
IF(fax>0,1,0) AS fax, \
|
||||
cj, \
|
||||
capital, \
|
||||
ape_etab, \
|
||||
@ -145,15 +144,42 @@ source ciblage
|
||||
dateImmat, \
|
||||
eff_entrep, \
|
||||
eff_etab, \
|
||||
IF(dirNom=='',0,1) AS dirNom, \
|
||||
nbEtab, \
|
||||
IF(sirenGrp>0,1,0) AS sirenGrp, \
|
||||
nbActio, \
|
||||
IF(nbActio>0,1,0) AS actio, \
|
||||
nbPart, \
|
||||
IF(nbPart>0,1,0) AS part, \
|
||||
bilType, \
|
||||
bilAnnee, \
|
||||
bilCloture, \
|
||||
bilDuree, \
|
||||
bilTca, \
|
||||
bilEE, \
|
||||
bilFL, \
|
||||
bilFK, \
|
||||
bilFR, \
|
||||
bilGF, \
|
||||
bilGP, \
|
||||
bilGU, \
|
||||
bilGW, \
|
||||
bilHD, \
|
||||
bilHH, \
|
||||
bilHL, \
|
||||
bilHM, \
|
||||
bilHN, \
|
||||
bilYP, \
|
||||
codeCommune AS adr_com, \
|
||||
FROM etablissements_act WHERE siren>100;
|
||||
|
||||
sql_attr_string = siren
|
||||
sql_attr_string = nic
|
||||
sql_attr_uint = actif
|
||||
sql_attr_uint = siege
|
||||
sql_attr_bool = actif
|
||||
sql_attr_bool = siege
|
||||
sql_attr_uint = adr_dep
|
||||
sql_attr_uint = tel
|
||||
sql_attr_uint = fax
|
||||
sql_attr_bool = tel
|
||||
sql_attr_bool = fax
|
||||
sql_attr_uint = cj
|
||||
sql_attr_uint = capital
|
||||
sql_attr_str2ordinal = ape_etab
|
||||
@ -164,29 +190,45 @@ source ciblage
|
||||
sql_attr_uint = tcaexp
|
||||
sql_attr_uint = teff_entrep
|
||||
sql_attr_uint = teff_etab
|
||||
sql_attr_uint = web
|
||||
sql_attr_uint = mail
|
||||
sql_attr_uint = actifEco
|
||||
sql_attr_uint = presentRcs
|
||||
sql_attr_uint = tvaIntraValide
|
||||
sql_attr_bool = web
|
||||
sql_attr_bool = mail
|
||||
sql_attr_bool = actifEco
|
||||
sql_attr_bool = presentRcs
|
||||
sql_attr_bool = tvaIntraValide
|
||||
sql_attr_uint = dateCrea_etab
|
||||
sql_attr_uint = dateCrea_ent
|
||||
sql_attr_uint = dateImmat
|
||||
sql_attr_uint = eff_entrep
|
||||
sql_attr_uint = eff_etab
|
||||
|
||||
sql_attr_bool = dirNom
|
||||
sql_attr_uint = nbEtab
|
||||
sql_attr_bool = sirenGrp
|
||||
sql_attr_uint = nbActio
|
||||
sql_attr_bool = actio
|
||||
sql_attr_uint = nbPart
|
||||
sql_attr_bool = part
|
||||
sql_attr_str2ordinal = bilType
|
||||
sql_attr_uint = bilAnnee
|
||||
sql_attr_uint = bilCloture
|
||||
sql_attr_uint = bilDuree
|
||||
sql_attr_uint = bilTca
|
||||
sql_attr_uint = bilEE
|
||||
sql_attr_uint = bilFL
|
||||
sql_attr_uint = bilFK
|
||||
sql_attr_uint = bilFR
|
||||
sql_attr_uint = bilGF
|
||||
sql_attr_uint = bilGP
|
||||
sql_attr_uint = bilGU
|
||||
sql_attr_uint = bilGW
|
||||
sql_attr_uint = bilHD
|
||||
sql_attr_uint = bilHH
|
||||
sql_attr_uint = bilHL
|
||||
sql_attr_uint = bilHM
|
||||
sql_attr_uint = bilHN
|
||||
sql_attr_uint = bilYP
|
||||
sql_attr_str2ordinal = adr_com
|
||||
}
|
||||
|
||||
SELECT id, actif, siege, siren , nic, adr_cp, REPLACE(REPLACE(adr_dep, '2B', 200), '2A', 200) AS adr_dep,\
|
||||
adr_com, (tel > 0) AS tel, (fax > 0) AS fax, cj, capital, ape_etab,\
|
||||
ape_entrep, age_entrep, age_etab, tcaexp, teff_entrep, teff_etab, rang, actifEco,\
|
||||
presentRcs, procolHisto, tvaIntraValide, NaceEtab, NaceEntrep, dateCrea_etab, dateCrea_ent,\
|
||||
dateImmat, eff_entrep, eff_etab, rivoli, nbEtab, if(sirenGrp>0, 1, 0) as sirenGrp, nbActio,\
|
||||
nbPart, bilType, bilAnnee, bilTca, bilEE, bilFL, bilFK, bilFR, bilGF, bilGP, bilGU,\
|
||||
bilGW, bilHD, bilHH, bilHL, bilHM, bilHN, bilYP, avisCs,\
|
||||
bilFL - bilFK AS bilFS, bilFR - bilGF AS bilGG, bilGP - bilGU AS bilGV, bilHD - bilHH AS bilHI FROM etablissements_act WHERE siren > 100
|
||||
|
||||
|
||||
index ciblage
|
||||
{
|
||||
source = ciblage
|
||||
|
Loading…
Reference in New Issue
Block a user