This commit is contained in:
Michael RICOIS 2012-08-17 15:20:33 +00:00
parent b019f6b269
commit 3cd79992d6

View File

@ -10,6 +10,7 @@ source ciblage
sql_query = \
SELECT id, LPAD(siren, 9, '000000000') AS siren, LPAD(nic, 5, '00000') AS nic, \
siege, \
adr_cp, \
REPLACE(REPLACE(adr_dep, '2B', '202'), '2A', '201') AS adr_dep, \
IF(tel>0,1,0) AS tel, \
IF(fax>0,1,0) AS fax, \
@ -21,8 +22,8 @@ source ciblage
age_etab, \
tca, \
tcaexp, \
IF(teff_entrep IS NULL,99,teff_entrep), \
IF(teff_etab IS NULL,99,teff_etab), \
IF(teff_entrep IS NULL,99,teff_entrep) AS teff_entrep, \
IF(teff_etab IS NULL,99,teff_etab) AS teff_etab, \
IF(web='',0,1) AS web, \
IF(mail='',0,1) AS mail, \
IF(adrDom>0,1,0) AS adrDom, \
@ -72,12 +73,10 @@ source ciblage
CASE avisCs WHEN 0 THEN 1 WHEN 10 THEN 2 WHEN 15 THEN 3 WHEN 23 THEN 4 WHEN 29 THEN 4 WHEN 39 THEN 4 WHEN 43 THEN 4 WHEN 21 THEN 5 WHEN 26 THEN 5 WHEN 28 THEN 5 WHEN 31 THEN 6 WHEN 50 THEN 6 WHEN 24 THEN 7 ELSE 0 END as avisCs \
FROM etablissements_act WHERE siren>100;
SELECT CASE avisCs WHEN 0 THEN 1 WHEN 10 THEN 2 WHEN 15 THEN 3 WHEN 23 THEN 4 WHEN 29 THEN 4 WHEN 39 THEN 4 WHEN 43 THEN 4 WHEN 21 THEN 5 WHEN 26 THEN 5 WHEN 28 THEN 5 WHEN 31 THEN 6 WHEN 50 THEN 6 WHEN 24 THEN 7 ELSE 0 END as avisCs FROM etablissements_act WHERE id=23514139
5907540
sql_field_string = siren
sql_field_string = nic
sql_attr_uint = siege
sql_attr_uint = adr_cp
sql_attr_uint = adr_dep
sql_attr_uint = tel
sql_attr_uint = fax
@ -135,6 +134,7 @@ SELECT CASE avisCs WHEN 0 THEN 1 WHEN 10 THEN 2 WHEN 15 THEN 3 WHEN 23 THEN 4 WH
sql_attr_uint = cucs
sql_attr_uint = zrr
sql_attr_uint = zafr
sql_attr_uint = avisCs
}
index ciblage