Well, THAT's an eye-opener. I only work with Poor Text.

d:)

Bruce

------ Original Message ------
Sent: 5/7/2016 12:42:15 AM
Subject: RE: [RBASE-L] - Concatenate VARCHAR
From: "MD" <[email protected]>
To: [email protected]
Cc:

Thank you Bruce for taking the time to help me.

Your method does allow me to concatenate the two text variables however the result is a VARCHAR column with text values when the original VARCHAR variable has Rich Text formatting code.





Something like this.

FIRST

The original VARCHAR variable comes from a VARCHAR column that contains Rich Text value.

The variable value looks like this:

{\rtf1\ansi\ansicpg0\uc1\deff0\deflang0\deflangfe0{\fonttbl{\f0\fnil\fcharset1 Arial;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}



\uc0

\pard\fi0\li0\ql\ri0\sb0\sa0\itap0 \plain \f0\fs20 This service report was change after the system created two SR like SR#16

\par \pard\fi0\li0\ql\ri0\sb0\sa0\itap0 made corrections to code and will try to make an invoice from this SR. 5/5/ 6:43 PM

\par \pard\fi0\li0\ql\ri0\sb0\sa0\itap0 \par}



On the form it looks like this:

This service report was change after the system created two SR like SR#16

made corrections to code and will try to make an invoice from this SR. 5/5/ 6:43 PM



SECOND

The vText value is:   Service Report:15  Technician: Manuel de Aguiar

I then make them datatype TEXT and then back to VARCHAR before I UPDATE the column the result in the Rich Text form object is:



Service Report:15  Technician: Manuel de Aguiar

{\rtf1\ansi\ansicpg0\uc1\deff0\deflang0\deflangfe0{\fonttbl{\f0\fnil\fcharset1 Arial;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}



\uc0

\pard\fi0\li0\ql\ri0\sb0\sa0\itap0 \plain \f0\fs20 This service report was change after the system created two SR like SR#16

\par \pard\fi0\li0\ql\ri0\sb0\sa0\itap0 made corrections to code and will try to make an invoice from this SR. 5/5/ 6:43 PM

\par \pard\fi0\li0\ql\ri0\sb0\sa0\itap0 \par}



I wanted the result to be:

Service Report: 15 Technician: Manuel de Aguiar

This service report was change after the system created two SR like SR#16

made corrections to code and will try to make an invoice from this SR. 5/5/ 6:43 PM





I really thank you for your input. I will probably figure it out when I get a larger bump on my head from hitting the wall.

Manuel



From:[email protected] [mailto:[email protected]] On Behalf Of Bruce Chitiea
Sent: Friday, May 6, 2016 11:46 AM
To:[email protected]
Subject: Re: [RBASE-L] - Concatenate VARCHAR



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.


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