Bonsoir Michael,

Je suis vraiment désolé mais je n’arrive pas à mon résultat, j’ai eu beau tout 
essayé, le seul résultat est que la variable issue du regroupement des deux 
autres
arrive dans le champ mais en format texte simplement et non en Rich Text.
Je mets en pièce jointe une table avec les deux champs «DETREP » et « OBSTECH » 
qui sont des champs VARCHAR et le résultat que je voudrais obtenir
qui est l’addition de ces deux champs je l’ai mis de façon manuelle dans le 
champ «OBSDET » pour que vous puissiez voir ce que je souhaite en final.
J’espère que vous me comprendrez !

bien cordialement,
JM

Traduction Google :

Good evening Michael,

I'm really sorry but I can't reach my result, I tried everything, the only 
result is that the variable resulting from the grouping of the other two
arrives in the field but in plain text format and not in Rich Text.
I attach a table with the two fields "DETREP" and "OBSTECH" which are VARCHAR 
fields and the result I would like to obtain
which is the addition of these two fields I put it manually in the "OBSDET" 
field so that you can see what I want in the end.
I hope you understand me!

Best regards,
JM


De : rbase-l@googlegroups.com [mailto:rbase-l@googlegroups.com] De la part de 
Michael Byerley
Envoyé : vendredi 22 mai 2020 18:58
À : RBASE-L
Objet : Re: [RBASE-L] - Re: Varchar

I cannot see all that you have done, but the following works for me.

*( Begin TEST CODE)

SET VAR vIdx INTEGER
SET VAR vc1 VARCHAR
SET VAR vc2 VARCHAR
SET VAR vc3 VARCHAR
SET VAR votherdata VARCHAR
-- I always use a variable to hold CARRIABE RETURN + NEW LINE instead of 
Literal character when combining text.
SET VAR vCrLf TEXT = ((CHAR(031)) + (CHAR(010)))

DROP CUR c1

DECLARE c1 CURSOR FOR SELECT idx, colvc1 colvc2 FROM testvarchar +
WHERE idx = 2

OPEN c1
FETCH c1 INTO vIdx IND vIn0, vc1 IND vIn0, vc2 IND vIn0
SELECT cmddata INTO votherdata IND vIn0 FROM testcontvc WHERE cmdname = 
'Startup'

WHILE SQLCODE = 0 THEN

  SET VAR vc3 = (.vc1 + .vcrlf + .vc2 + .vcrlf + .votherdata )
  UPDATE testvarchar SET colvc1 = .vc3 WHERE CURRENT OF c1
  --UPDATE testvarchar SET colvc1 = NULL WHERE CURRENT OF c1
  FETCH c1 INTO vIdx IND vIn0, vc1 IND vIn0, vc2 IND vIn0

ENDWHILE
DROP CUR c1

RETURN
*(End Test Code)

*( Explanation )
*( Table TestContVC contains VarChar Column containing value:
Startup
startup
SELECT

 Table TestVarChar has 4 columns:
  IDX Integer, ColVC1 VarChar, ColVC2 VarChar, ColVC3 VarChar

 Cursor row IDX = 2
  ColVC1 = Jean-Marc Massé
  ColVC2 = 85510 ROCHETREJOUX
  ColVC3 = null

  *It is IMPORTANT to declare ALL variables used BEFORE use in code.  DO NOT
  rely on RBASE to do type conversion for you for greatest reliability.

  )

On Friday, May 22, 2020 at 4:46:30 AM UTC-4, jmmasse wrote:
Merci Michael pour tous ces conseils, mais c’est la variable combinée qui ne 
marche pas !

SET VAR VNEWOBSTECH VARCHAR = (.VOBSTECH1+"þ"+.VDETREP)

Elle ne produit aucun résultat, auriez-vous une idée ?


Thanks Michael for all of this advice, but it's the combined variable that 
doesn't work!

SET VAR VNEWOBSTECH VARCHAR = (.VOBSTECH1 + "þ" +. VDETREP)

It produces no results, do you have an idea?



Cordialement,

JM

De : rba...@googlegroups.com<javascript:> 
[mailto:rba...@googlegroups.com<javascript:>] De la part de Michael Byerley
Envoyé : jeudi 21 mai 2020 15:37
À : RBASE-L
Objet : [RBASE-L] - Re: Varchar


OK, Excepting that your statement would work, but not consistent with current 
structure:

SET VAR VDETREP VARCHAR = DETREP IN LANCQUEST WHERE NUMQUEST = .VNUMQUEST

Would be best restated as a SELECT clause like;

Set var vDetRep VarChar = null

Select DetRep into vDetRep ind Vin0 from LancQuest where NumQuest = .vNumQuest

Using Select gives the opportunity throughout your system, of additional checks 
for null when required, by checking the INDICATOR variable value.


On Wednesday, May 20, 2020 at 2:21:09 AM UTC-4, jmmasse wrote:

Bonjour à tous,

Utilisateur de Rbase depuis de très nombreuses années, je suis avec beaucoup 
d’attention tout ce qui se dit sur le forum.
John MINYO m’a inscrit récemment et je voudrais formuler une demande concernant 
un champ  « VARCHAR ».
Dans une table j’ai un champ Historique de type « VARCHAR » qui concerne des 
opérations de maintenance.
Je voudrais enrichir cet historique en y rajoutant des données elles aussi de 
type « VARCHAR » issues d’une autre table
qui recense des opérations ponctuelles de façon à obtenir un historique complet.
Je me heurte à un message d’erreur qui m’indique que cela n’est pas possible !
Auriez-vous une approche qui me permette d’obtenir ce résultat ?


Good morning all,

As a Rbase user for many years, I follow with great attention everything that 
is said on the forum.
John MINYO signed me up recently and I would like to make a request regarding a 
« VARCHAR » field.
In a table I have a History field of type "VARCHAR" which relates to 
maintenance operations.
I would like to enrich this history by adding data also of type "VARCHAR" from 
another table
which identifies specific operations in order to obtain a complete history.
I run into an error message which tells me that this is not possible!
Do you have an approach that allows me to achieve this result?

Regards,

________________________________
Jean-Marc Massé (mobile : 06.08.82.80.86)
Directeur
Sté MCS
 19, rue de la Mine
85510 ROCHETREJOUX (France)
________________________________



--
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 rba...@googlegroups.com<javascript:>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/f60916cb-fb6e-4683-90b5-e5b411fc4b25%40googlegroups.com<https://groups.google.com/d/msgid/rbase-l/f60916cb-fb6e-4683-90b5-e5b411fc4b25%40googlegroups.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 
rbase-l+unsubscr...@googlegroups.com<mailto:rbase-l+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/b8c2a235-e741-4fda-949f-3c8976b38eba%40googlegroups.com<https://groups.google.com/d/msgid/rbase-l/b8c2a235-e741-4fda-949f-3c8976b38eba%40googlegroups.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 rbase-l+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/7724bb98b5ab4fbabc52fa19966d6642%40masse-charpente.fr.

<<attachment: MCS-ESSAIS.zip>>

Reply via email to