Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Bonjour,
Je fais un graphique qui comptabilise le nombre de logements créés dans la matrice cadastrale en distinguant maisons et appartements. La dimension s'appelle DTELOC et est codé en 1=maison et 2 =appartement.
Je voudrais que ma légende ne fasse pas apparaitre ce 1 et ce 2 mais les renomme en maison et appartement.
Quelles solutions auriez vous ? si possible dans l'interface plutôt que dans le script ?
Merci
I think you have to change the script, adding to your values 1, 2 another field with the description you need, then using the new field in your chart
Ok, dans ce cas comment dois je changer mon script ?
Probably you have something like:
Load
...
...
DTELOC
...
Resident
....
Where
...
Then, change this to:
Load
...
...
DTELOC,
If(DTELOC=1,'Maison', If(DTELOC=2, 'Appartement', 'Undefined')) as NewDTELOC
...
Resident
....
Where
...
Let me know
Je l'ai inséré comme ça dans mon script mais ça ne marche pas encore ?
ODBC CONNECT32 TO [CAD_MATRICE;DBQ=I:\Grandavignon_donneestravail\Gdavignon_cad_matrice\CAD_MAJIC.mdb];
//-------- Start Multiple Select Statements ------
SQL SELECT CODCOMM as INSEE,
CODPARC,
INVAR,
JANNAT as annee,
CCONLC,
DTELOC,
If(DTELOC=1,'Maison', If(DTELOC=2, 'Appartement', 'Undefined')) as NewDTELOC
FROM `LOGT_DATE`;
//-------- End Multiple Select Statements ------
Ok now use NewDTELOC in place of DTELOC
Oui ça j'ai bien compris mais ça ne marche pas au niveau du script !
je ne sais pas comment insérer "proprement" un if dans le script
This syntax is correct!!
SQL SELECT CODCOMM as INSEE,
CODPARC,
INVAR,
JANNAT as annee,
CCONLC,
DTELOC,
If(DTELOC=1,'Maison', If(DTELOC=2, 'Appartement', 'Undefined')) as NewDTELOC
FROM `LOGT_DATE`;
Alessandro,
Désolée, ça ne marche toujours pas, je pense que c'est un problème de ' ou de " ou de ]
Voilà le message :
Fonction 'If' non définie dans l'expression.
SQL SELECT
If(DTELOC ='1','Maison', 'Undefined') as NewDTELOC
FROM `LOGT_DATE`
which DB are you using?
Sql Server? MySQL? Access?