generate a new column on a table

444
3
11-29-2016 07:36 AM
johnwoollett1
New Contributor II

I have a data table and want to perform an sql query to build a new column on the data containing data from several data columns, how can this be done?

eg  IF(FIND('-',Location_Code)=4, LEFT(Location_Code, 12), LEFT(Location_Code, 13))

thanks  john woollett

Tags (1)
0 Kudos
3 Replies
AdrianWelsh
MVP Notable Contributor

John,

What format is your data table in? What software are you using for running this SQL query?

In any case, take a look at the info here. This might help:

Building a query expression—Help | ArcGIS for Desktop 

0 Kudos
johnwoollett1
New Contributor II

Hi

Its in an oracle database, I want to reproduce a Functional Attribute from an Intergraph geoworkspace.

I need to use FIND,LEFT,RIGHT functions to compile the result

thanks

0 Kudos
AdrianWelsh
MVP Notable Contributor

John,

You may get better luck placing this thread in Enterprise GIS‌ or ArcGIS for Server‌. Having oracle tags in it would help as well.

0 Kudos