generate a new column on a table

348
3
11-29-2016 07:36 AM
Highlighted
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)
Reply
0 Kudos
3 Replies
Highlighted
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 

Reply
0 Kudos
Highlighted
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

Reply
0 Kudos
Highlighted
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.

Reply
0 Kudos