ATOUTFOX
COMMUNAUTÉ FRANCOPHONE DES PROFESSIONNELS FOXPRO
Visual FoxPro : le développement durable

Forum AtoutFox : Re: concatener   

Sujet

rss Flux RSS des derniers messages

Vous devez vous identifier pour pouvoir poser une question ou répondre.

lun. 13 février 2012, 09h20
joe.mojito
France France

atoutfox.public.association

Re: concatener

merci, maintenant je cherche comment faire une boucle pour remplacer chaque ligne de la table avec ca: replace pomme.num with STUFF(poire.codefact,7,4,pomme.num)

public Xrepdata, Xrepimport
Xrepdata = [\c_moulinette\]
Xrepdata = Sys(5)+Xrepdata


SET dire to &Xrepdata

SELECT 1
USE poire ALIAS poire
SET ORDER TO REP
GO top
Xrepcentre = Xrepdata+Trim(poire.Rep)
SET directory to &xrepcentre
SELECT 2
CREATE TABLE 'pomme' (centre 'C' (6), fact 'C' (10), num 'C'(10), seri 'C'(50) )
APPEND FROM cerise FIELDS fact,num,seri

SELECT 0
GO top
do while !Eof()
         gnDbcnumber = ALEN(pomme,0)
  for Ncount = 1 to gnDbcnumber
replace pomme.centre with poire.centre
replace pomme.num with STUFF(poire.codefact,7,4,pomme.num)
  endfor
ENDDO
set directory to &xrepdata
select poire
skip


Permalink : http://www.atoutfox.org/nntp.asp?ID=0000008185
20 286 messages dans le forum • Liste complète des messages

www.atoutfox.org - Site de la Communauté Francophone des Professionnels FoxPro - v3.4.0 - © 2004-2026.
Cette page est générée par un composant COM+ développé en Visual FoxPro 9.0-SP2-HF3