Not having much experience in SQL or Python, I'm trying to take a shot at labeling a field using a SUBSTRING expression to return only the first 6 characters of a field.
The field is [SITE_ADDRE]
My expression looks like this: SUBSTRING ([SITE_ADDRE] FROM 1 FOR 6)
I'm getting an error message so I know this is incorrect.
The [0:6] is an index which return the the values of the string values in your field, from the first(python is zero indexed so first thing is 0) up to 6, but not including it.
Should return the first 6 characters of your field value.
The [0:6] is an index which return the the values of the string values in your field, from the first(python is zero indexed so first thing is 0) up to 6, but not including it.
Should return the first 6 characters of your field value.
Actually, we have had alot of threads about how to format labels with python(and other means). Always be sure to check the forums for similar posts, before starting a new one.