Senor de Aguiar:

I ran into this issue as well some time ago. Bottom line: One cannot concatenate TEXT and VARCHAR ... directly.

Bottom line: if the VARCHAR variable can be converted to text, the two text strings can be joined, then converted back to VARCHAR.

Try this simple experiment at the R>:

SET VAR vText TEXT = 'This is Text ...'
SET VAR vVarChar VARCHAR = 'AND THIS IS VARCHAR
SET VAR vConcat VARCHAR = (.vText & .vVarChar)

... produces Error 2151 TEXT cannot be added to VARCHAR

SET VAR vConcat TEXT = (.vText & .vVarChar)

... produces Error 2151 TEXT cannot be added to VARCHAR

Now, using these three variables, try this:

SET VAR vVarChar TEXT
SET VAR vConcat TEXT = (.vText & .vVarChar)
SHOW VAR vConcat

... produces the TEXT variable: This is Text ... AND THIS IS VARCHAR

Now, do this:

SET VAR vConcat VARCHAR
SHOW VAR vConcat

... produces the VARCHAR variable: This is Text ... AND THIS IS VARCHAR


Hope that helps,

Bruce Chitiea
SafeSectors, Inc.
909.238.9012 Mobile


------ Original Message ------
From: "MD" <[email protected]>
To: [email protected]
Sent: 5/5/2016 8:35:57 PM
Subject: [RBASE-L] - Concatenate VARCHAR

Hello,

I need your help. I need to add text to a VARCHAR variable so that I can UPDATE the VARCHAR column. The VARCHAR column hold data and I want to concatenate text information before the existing data.

I have a form variable (vvComment) that hold the VARCHAR column value. I have tried.

SET VAR vvComment = ( ‘Manuel’ + .vvComment)

AND

SET VAR vComment VARCHAR = (‘Manuel’ + .vvComment)

AND

Other combination but they won’t concatenate.  What am I missing.

I am using

R:BASE eXtreme 9.5 (32), U.S. Version, Build: 9.5.5.30414



I will be most grateful for any blues clues.

Thank you,

Manuel de Aguiar








--
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.

--
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.

Reply via email to