>Hello alls.
>I have a field called (phone) this has the format [(#####)-########], for sample (03564)-462193, where the firts numbers are the prefix and the others are the phone number. I need divide the field in two variables, just one before the (-) and before the (-). The problem is that not always the prefix has the same lengt. In consequence I dont know how many places count to divide the field.
Since you always have the "-", use AT() to get the position of it. e.g.
cFirstPart = LEFT(phone, AT("-", phone)-1)
cSecondPart = SUBSTR(phone, AT("_", phone)+1)
Insanity: Doing the same thing over and over and expecting different results.