AnsweredAssumed Answered

Help needed for definition query syntax to trim off leading 0s in text field.

Question asked by jjedlicka_usfs on May 20, 2020
Latest reply on May 20, 2020 by bking-esristaff

Hi. I keep getting errors - This is the syntax directly from ESRI:

 

TRIM(BOTH | LEADING | TRAILING trim_character FROM string_exp)

I have tried: 

TRIM(LEADING '0' FROM "TRAIL_NO")

TRIM(LEADING '0' FROM '0%')

 

both of these error with 

Invalid SQL syntax [ORA-00920: invalid relational operator]

I have also tried many other iterations and have received errors such as missing expression, etc.

 

What is the correct syntax to remove leading 0s from a text field?  Please help, thanks!!

 

Also odd - one of the errors showed [STATE_ID = 27] and I do not have a state id field in my attribute table.

 

Thanks!!!!

Outcomes