OK, this will untested code should get the last 4 characters of the 1st
col and concatenate "UNIT" and those 4 characters to col 2.
UPDATE TableName SET +
Col2 = (Col2 & 'UNIT' & (SGET(Col1,4,((SLEN(Col1)) - 4))) )
The only thing I'm sure of is the parenthesis are balanced. :)
Doug
On 4/28/2024 4:43 PM, Larry Haas wrote:
Yes, but it is not a numeric field.
Larry
On Sun, Apr 28, 2024 at 2:34 PM Doug Hamilton <[email protected]> wrote:
Do all rows have numeric 4 last characters?
If not, then after extracting them, they have to be tested.
Otherwise you'd end up with "13566 Jones Road UNIT h a."
Doable with functions, I think; just need more info.
Doug
On 4/28/2024 3:56 PM, Larry Haas wrote:
Good afternoon everyone:
I am working with Myron at the Sun City West Posse in Sun City
West, Arizona. I am trying to update a field in my table using
that field and concatenating something to it.
In Excel, it would look like this:
Field 1 Field 2
Smith a.4503 13566 Jones Road 13566 Jones
Road UNIT 4503
concatenate(field 2," UNIT ",right(Field 1),4)
UPDATE tableName
set field2 = (Code needed here)
Where
I am trying to add the text field 'UNIT' and the last 4 positions
of Field 1 to the existing field 2 in the existing table. I
couldn't find a concatenation function or a function capable
of grabbing the last 4 characters of another field. Is there a
way that this is possible?
Thanks,
Larry Haas
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the
Google Groups "RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rbase-l/CAB3VSUX1V%2BOtARHoaU0o5%2BcHZ0qNw9DmEAc-Nd60wJJ4-iX4Tw%40mail.gmail.com
<https://groups.google.com/d/msgid/rbase-l/CAB3VSUX1V%2BOtARHoaU0o5%2BcHZ0qNw9DmEAc-Nd60wJJ4-iX4Tw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
Virus-free.www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
<#m_770669927460156836_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google
Groups "RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rbase-l/68484969-350a-415d-897d-cf4514ce208c%40wi.rr.com
<https://groups.google.com/d/msgid/rbase-l/68484969-350a-415d-897d-cf4514ce208c%40wi.rr.com?utm_medium=email&utm_source=footer>.
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google
Groups "RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rbase-l/CAB3VSUU%2BGRBXKwgAR5Hcg1W6MG8enPSZJEYa-13vQy95VJQz%3DA%40mail.gmail.com
<https://groups.google.com/d/msgid/rbase-l/CAB3VSUU%2BGRBXKwgAR5Hcg1W6MG8enPSZJEYa-13vQy95VJQz%3DA%40mail.gmail.com?utm_medium=email&utm_source=footer>.
--
This email has been checked for viruses by Avast antivirus software.
www.avast.com
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google Groups "RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rbase-l/85e3fa6d-775f-468c-ac6e-aa7f4d0f6028%40wi.rr.com.