Shapefile new column

6/12/2014 2:03:05 AM
Total Posts 5

Shapefile new column

Dear forummembers,

How do I add new field/column/attribute to a shapefile.

 

Thanks & Regards

6/12/2014 5:06:50 AM
MVP
Total Posts 323

Re: Shapefile new column

Editing is supported for database layers, see the 'Spatial Databases\Editing Spatial and Attribute Data' topic in the documentation.

6/12/2014 11:42:10 PM
Total Posts 5

Re: Shapefile new column

I couldn't find any link specifying how to add a new column to an existing shapefile. Can you please help me out with the link for such documentation or else an example would be highly appreciated.

 

Thanks & Regards

6/13/2014 1:17:13 AM
MVP
Total Posts 323

Re: Shapefile new column

Editing of shapefiles is not supported.

6/13/2014 3:01:31 AM
Total Posts 5

Re: Shapefile new column

Oops. So can you help me out with this.

I wat to query on a combination of three columns for example I have three columns in my shape file

Columnname           datatype

Name                         string

age                             string

sex                              string

 

I want to search on the combination of three columns like

where name+age+sex='value to be seacrched'

I don;t want to search like this:

where name='value to be seacrched' or age='value to be seacrched' or sex='value to be seacrched'

neither like this

where name='value to be seacrched' and age='value to be seacrched' and sex='value to be seacrched'

 

6/14/2014 1:01:49 AM
MVP
Total Posts 323

Re: Shapefile new column

Try to use the LIKE or InStr function.

[C#]

expr = "LIKE(\"name\" & \" \" & age  & \" \" & sex, \"*value to be searched*\")";
expr = "InStr(\"name\" & \" \" & age  & \" \" & sex, \"value to be seacrched\") > 0";

[VB]

expr = "LIKE(""name"" & "" "" & age  & "" "" & sex, ""*value to be searched*"");

expr = "InStr(""name"" & "" "" & age  & "" "" & sex, ""value to be seacrched"") > 0";

 

The expression engine uses VBScript, the string concatenation operator is &

See the VBScript manual for string search functions