Ajout adr_cp

This commit is contained in:
Michael RICOIS 2012-07-31 12:00:39 +00:00
parent f5bf1ca954
commit 9370ce5b7f

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, \
@ -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