Bonjour Michael,

Merci pour l’aide, mais j’ai construit un code qui ne marche pas !
Pouvez-vous m’aidez encore ?
Voici mon code

CLS
SET VAR VOBSTECH1 VARCHAR = NULL
SET VAR VNEWOBSTECH VARCHAR =
SET VAR VDETREP VARCHAR = DETREP IN LANCQUEST WHERE NUMQUEST = .VNUMQUEST

DECLARE cursor1 CURSOR FOR SELECT OBSTECH FROM LANCTECH WHERE NUMTECH = 
.VNUMTECH
OPEN cursor1
FETCH cursor1 INTO VOBSTECH1 INDICATOR iv1

WHILE sqlcode <>100 THEN
SHOW VARIABLE VOBSTECH1

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

SHOW VARIABLE VNEWOBSTECH
FETCH cursor1 INTO VOBSTECH1 INDICATOR iv1

  ENDWHILE

DROP CURSOR cursor1
UPDATE LANCTECH SET OBSTECH = .VNEWOBSTECH WHERE NUMTECH = .VNUMTECH


RECALC VARIABLES
CLEAR VAR VOBSTECH1,VNEWOBSTECH,VDETREP
RETURN


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



De : [email protected] [mailto:[email protected]] De la part de 
Michael Byerley
Envoyé : mercredi 20 mai 2020 16:39
À : RBASE-L
Objet : [RBASE-L] - Re: Varchar


 You can't grammatically add to a varchar data, but you can select the the 
value from the primary table into a variable, then select the value to be added 
into another variable, combine the two variables, then update the primary table 
with the combined data.

So, if you had more than one instance of this to perform, you would have to do 
it using a CURSOR, as an UPDATE using a SELECT combining two sources will not 
work.


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 
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/5b6527b5-5cb0-46ef-bc4d-525e9f03fe1d%40googlegroups.com<https://groups.google.com/d/msgid/rbase-l/5b6527b5-5cb0-46ef-bc4d-525e9f03fe1d%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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/24066f0dbacc427ca89a5579595e8e46%40masse-charpente.fr.

Reply via email to