Buddy: Thanks, you are absolutely right. That would have done the job
in this context. Pays to review the Function list every now and again.
Any thoughts, though, on why this:
UPDATE transx SET trxnum = (SRPL('V0','V','v',0)) WHERE trxnum LIKE
'V0%'
... would replace every selected column value [ V0xxxxxx | v0xxxxxx ] to
'v0' ? My understanding of SRPL is that only the 'V' character value
would be affected.
Thanks
Bruce
------ Original Message ------
From: "Buddy Walker" <[email protected]>
To: [email protected]
Sent: 1/14/2018 1:30:08 PM
Subject: RE: Re[2]: [RBASE-L] - Disaster Avoidance: SRPL Syntax Question
Bruce
Maybe I’m missing something but you could have used the function ULC
if “V” was the only alpha character in the field
UPDATE tableNameHere SET columnName = (ULC(columnName)) WHERE if you
need it.
Buddy
From:[email protected] [mailto:[email protected]] On
Behalf Of Bruce Chitiea
Sent: Sunday, January 14, 2018 4:12 PM
To:[email protected]
Subject: Re[2]: [RBASE-L] - Disaster Avoidance: SRPL Syntax Question
Karen:
All my error.
That's EXACTLY what I wanted to do (per the WHERE clause. )
I had run your syntax earlier, and failed. Then ran my fatal syntax
without understanding WHY it failed.
I reviewed the command history only after I posted. My syntax failed
because I muffed the WHERE clause in that first run. Instead of
[ WHERE trxnum LIKE 'V0%' ]
... I had typed
[ WHERE trxnum = 'V0' ]
... a stand-alone value which does not exist in the column.
But that leaves the question: "Why would it replace the entire string [
V00xxxxxx | v00xxxxxx ] with 'v0' ?"
Thanks again, Karen
Bruce
------ Original Message ------
From: "karentellef via RBASE-L" <[email protected]>
To: [email protected]
Sent: 1/14/2018 12:06:38 PM
Subject: Re: [RBASE-L] - Disaster Avoidance: SRPL Syntax Question
Maybe I'm reading your statement wrong, but no I don't think that's what
you wanted to do. Did you want to do this?
UPDATE transx SET trxnum = (SRPL(trxnum, 'V0', 'v0', 0))
Karen
-----Original Message-----
From: Bruce Chitiea <[email protected]>
To: rbase-l <[email protected]>
Sent: Sun, Jan 14, 2018 12:11 pm
Subject: [RBASE-L] - Disaster Avoidance: SRPL Syntax Question
Happy New Year to all!
Might this be the correct SRPL syntax for replacing a substring within a
text column? If not, what?
SET VAR vTargetColumn TEXT = NULL
SET VAR vTargetColumn = 'ColumnNAME'
UPDATE TableNAME SET &vTargetColumn =
(SRPL(&vTargetColumn,'SearchString','ReplaceString',0))
I ask because I attempted a SRPL on a column using a literal string in
place of '&vTargetColumn', with an ugly result (Fortunately I had a
backup. )
Target column 'transx' contained several thousand values [ V00xxxxxx |
v00xxxxxx ] where 'x' might be any digit. For visual
clarity-in-reporting's sake, I decided to replace the legacy capital 'V'
with lower case 'v'.
UPDATE transx SET trxnum = (SRPL('V0','V','v',0)) WHERE trxnum LIKE
'V0%'
This produced a uniform value of 'v0'. No trailing digits. Disaster.
Restore from backup.
???
Thanks very much,
Bruce Chitiea
SafeSectors, Inc.
909.238.9012 m
--
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].
For more options, visit https://groups.google.com/d/optout.
--
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].
For more options, visit https://groups.google.com/d/optout.
--
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].
For more options, visit https://groups.google.com/d/optout.
--
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].
For more options, visit https://groups.google.com/d/optout.
--
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].
For more options, visit https://groups.google.com/d/optout.