Re: [Qgis-user] field calculator and query: asking help for faster solution!!!

2016-11-15 Thread Azzurra Lentini
Dear Claas
yes thanks a lot.. it is working.

and thanks to all for the answers.

Azzu

2016-11-15 22:12 GMT+01:00 Claas Leiner :

>
> You can do ist with:
>
> --
> case
> when “DESCRIPTION” = 'sample1' then 1
> when “DESCRIPTION” = 'sample2' then 2
> ...
> when “DESCRIPTION” = 'sample25' then 25
> end
> --
> Claas
>
>
> Am 15.11.2016 um 21:51 schrieb Azzurra Lentini:
>
>> Dear all,
>>
>> I have an attribute table (associated to a shape file).
>>
>> One of the field  is a string type field and his name is “DESCRIPTION” ,
>> I need this field as an  INT number.
>>
>> The field “description” is formed by 25 different samples and around 350
>> records (so for every sample there are different records with the same
>> description).
>>
>> SO I create a new field “descriptionINT” and I would like to fill the
>> field with 25 numbers (1, 2, 3, 25) associated to the 25 different
>> sample and 350 records.
>>
>> How I can do?
>>
>> Till now, I was first selecting the records related to the first sample
>> and I was giving the number, for example 1 (with field calculator) to
>> all the records related to the same sample.
>>
>> But I am doing this one by one.. that means every time a do a new
>> selection and I give a new number with field calculator.
>>
>> Do you know a faster way (query)  to do this ?
>>
>>
>> ​thanks A.L. ​
>>
>> --
>> Dr. Hydrogeologist
>> AZZURRA LENTINI
>> Expert of evaluation environmental hazards
>> GIS application
>> Haity Mobile Tel: 0050946057393
>> ++
>> Italy Mobile Tel.: **(39) 338 24 40 676
>> ++
>> SKYPE azzurrahydro
>> ++
>> azzurralent...@gmail.com 
>> ++
>> *Par respect pour l'environnement,*
>>
>> *n'imprimez ce mail qu'en cas d'absolue nécessité*
>>
>>
>>
>>
>>
>>
>>
>>
>> ___
>> Qgis-user mailing list
>> Qgis-user@lists.osgeo.org
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>>
>
> --
> -
> GKG-Kassel - Dr.-Ing. Claas Leiner
> QGIS-Support und mehr
>
> Geodatenservice, Kartenwerkstatt &
> GIS-Schule Kassel
>
> Wilhelmshöher Allee 304 E
> 34131 Kassel
> Tel. 0561/56013445
> claas.lei...@gkg-kassel.de
> 
> http://www.gkg-kassel.de
> 
> Unterstützen Sie QGIS
> QGIS-DE e.V. | http://qgis.de
> QGIS Projekt | http://qgis.org/de/site/
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user




-- 
Dr. Hydrogeologist
AZZURRA LENTINI
Expert of evaluation environmental hazards
GIS application
Haity Mobile Tel: 0050946057393
++
Italy Mobile Tel.: **(39) 338 24 40 676
++
SKYPE azzurrahydro
++
azzurralent...@gmail.com
++
*Par respect pour l'environnement,*

*n'imprimez ce mail qu'en cas d'absolue nécessité*
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] field calculator and query: asking help for faster solution!!!

2016-11-15 Thread Bernd Vogelgesang
Sorry, I still have no idea what your data looks like and what you like to  
achieve.


Cheers
Bernd

Am 15.11.2016, 21:51 Uhr, schrieb Azzurra Lentini  
:




Dear all,
I have an attribute table (associated to a shape file).

One of the field  is a string type field and his name is “DESCRIPTION” ,  
I need this field as an  INT number.
The field “description” is formed by 25 different samples and around 350  
records (so for every sample there are different records with the same  
>description).


SO I create a new field “descriptionINT” and I would like to fill the  
field with 25 numbers (1, 2, 3, 25) associated to the 25 different  
sample and 350 >records.

How I can do?
Till now, I was first selecting the records related to the first sample  
and I was giving the number, for example 1 (with field calculator) to  
all the records >related to the same sample.
But I am doing this one by one.. that means every time a do a new  
selection and I give a new number with field calculator.

Do you know a faster way (query)  to do this ?
​thanks A.L. ​

--Dr. HydrogeologistAZZURRA LENTINI
Expert of evaluation environmental hazards
GIS applicationHaity Mobile Tel: 0050946057393
++
Italy Mobile Tel.: **(39) 338 24 40 676
++
SKYPE azzurrahydro
++
azzurralent...@gmail.com
++
*Par respect pour l'environnement,*

*n'imprimez ce mail qu'en cas d'absolue nécessité*









--
Bernd Vogelgesang
Siedlerstraße 2
91083 Baiersdorf/Igelsdorf
Tel: 09133-825374___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user