Select to view content in your preferred language

FGDB views: Since the division operator '/' isn't supported, create a DIVIDE() function instead

854
2
12-05-2022 06:34 PM
Status: Open
Labels (1)
Bud
by
Honored Contributor

When we create views using the Create Database View (Data Management) tool, we can't use the forward slash operator '/' in the SQL definition.

  • For enterprise and mobile geodatabases, we can work around the issue by creating the view through an SQL client instead of using ArcGIS.
  • But for file geodatabases, the database is inaccessible outside of ArcObjects. So, the only way to do things like create a database view is through ArcGIS using the Create Database View (Data Management) tool.

We need to be able to use forward slashes in FGDB views to do basic math like divide numbers and fields. 

It looks like Esri has known about the issue since 2015 (although FGDB views are a recent development). See: BUG-000085841So that makes me think Esri isn't able to fix this bug.

If that's the case, then could Esri provide a workaround for division in FGDB views, such as adding a DIVIDE() function to the FGDB database engine?

divide(10, 2),  --would resolve to 5.
divide(field_A, field_B)

That would give us a way to divide numbers and fields in FGDB database views.

Tags (3)
2 Comments
Luke_Pinner

It's a strange limitation/bug.

A half workaround would be to multiply by 1/N e.g. if you want to divide by 2, instead  multiply by 0.5.

I say "half workaround" as obviously if you want to divide by a field value instead of a number, then this won't work.

Bud
by

@SSWoodward@TanuHoque and team, are you able to advise:
 
What are ESRI's thoughts on creating a DIVIDE() function? Is there a plan for addressing this issue?