create cursor curdummy; (cSdNummer c(7), cnosecretariat c(7), cType c(5), ddate d, cSdCode c(4), TotHo c(4)) *you may have to change the structure of this cursor! append from yourtextfile SDF CursorToXML('curdummy','yourxmlfile.xml',1,512)>it is two different program.
>>SELECT cursorfinal >>CursorToXML('cursorfinal','yourxmlfile.xml',1,512)>>
>>>SELECT PADL( ALLTRIM( Tempx.cnosecretariat) ,7 , "0" ) AS 'cnosecretariat',; >>> TRANSFORM( Tempx.iemployeid , "@L 9999999" ) AS 'iemployeid',; >>> Tempx.ddate,; >>> Tempx.iplanpauseid,; >>> SurSalaire,; >>> PADL( TRANSFORM( INT( SUM( totheure ) * 100 )), 4 , "0" ) AS 'TotHo' ,; >>> MAX( Planpause.cnom ) AS 'cnomPlanpause',; >>> MAX( PADL( Planpause.cnomsecsocial , 4 , "0" ) ) AS 'cnomsecsocial',; >>> SPACE(4) AS cSdCode ,; >>> MAX( IIF( ISNULL( D.djour ) , .F. , .T. )) AS 'jf',; >>> MAX( Planpause.lnuit ) AS 'lnuit',; >>> MAX( 'K' ) AS 'cType',; >>> PADL( ALLTRIM( ls_numdossier ) ,7 , "0" ) AS 'cSdNummer'; >>> FROM Tempx ; >>> INNER JOIN Planpause ON Tempx.iplanpauseid = Planpause.iid ; >>> INNER JOIN Securit ON Securit.itelephoneid = Tempx.itelephoneid ; >>> LEFT JOIN DatesFiltred D ON D.djour = Tempx.ddate ; >>> GROUP BY 1,2,3,4,5 READWRITE INTO CURSOR CursorFinal >>> >>>SELECT cursorfinal >>> >>>*-- Transforme éventuellement un code de centralisation >>>*-- en fonction d'un sursalaire. Ex : 0010 devient 0011 le samedi. >>>UPDATE cursorfinal SET cSdCode = THIS.cSdCodeFind() >>> >>>SET SAFETY OFF >>> >>>clocToExport = "c:\" >>>cNameToExport = "ExportSd.txt" >>>THIS.cNameToExport = clocToExport + cNameToExport >>>*-- 08/2006 Le nom du fichier est à modifier ? >>>COPY TO ( THIS.cNameToExport ) TYPE SDF FIELDS ; >>> cSdNummer,; >>> cnosecretariat ,; >>> cType,; >>> ddate,; >>> cSdCode,; >>> TotHo >>> >>>>>>