Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cros Tab
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9
Database:
Visual FoxPro
Divers
Thread ID:
01011056
Message ID:
01011562
Vues:
15
This message has been marked as a message which has helped to the initial question of the thread.
It's one of the way to do it which requires to now in advance a pause number for particular day.
To avoid possible field data truncation I would change
ALLTRIM( TRANSFORM( H.iemployeeid ) ) + H.no AS 'iemplId' 
* to
PADR(TRANSFORM( H.iemployeeid ) ) + H.no, 12) AS iemplId 
>something like that...
>
>
> *-- 05/2005 il faut réaliser une table croisée en ajoutant un élement en abscisse
>    *-- en créant un champs composé.
>    SELECT ALLTRIM( TRANSFORM( H.iemployeeid ) ) + H.no AS 'iemplId' ,;
>      H.ddate , H.cnomp AS 'Min';
>      FROM  tpsH H  ORDER BY 1 , 2 INTO CURSOR PauseBefore_vfpTabCursor
>
>    DO vfpxtab.prg WITH 'NomPauseMois',.T.,.F.,.F.,,,,.T.,0,.F.
>
>
>    *!*	    *---------------------------------------------------------------------------
>    *!*	    *-- Nom de la Deuxième pause  ( Cpauseid2)   'CE'     'AC'   etc...
>    *!*	    SELECT H.iemployeeid AS 'iemplId' , H.ddate, H.cnomp AS 'Min';
>    *!*	      FROM  tpsH H WHERE H.no = 2  ;
>    *!*	      UNION ;
>    *!*	      SELECT c.iemplId , c.ddate , c.MIN;
>    *!*	      FROM cLeurre c ORDER BY 1 , 2 INTO CURSOR PauseNo2
>    *!*	    DO vfpxtab.prg WITH 'NomP2',.T.,.F.,.F.,,,,.T.,0,.F.
>    *!*	    *---------------------------------------------------------------------------
>    *!*	    *-- On unit pour les motifs énumérés ci dessus .....
>    SELECT 'P1' AS 'cPauseNo' , NomPauseMois.* FROM NomPauseMois WHERE ;
>      '/1' $ NomPauseMois.iemplId ;
>      UNION;
>      SELECT 'P2' AS 'cPauseNo' , NomPauseMois.* FROM NomPauseMois WHERE;
>      '/2' $ NomPauseMois.iemplId INTO CURSOR TotPauseLettre READWRITE
>
>    *-- UT 05/2005 Le tour est joué , on transforme '1458/1' ou '1458/2' en 1458 ( entier )
>    ALTER TABLE TotPauseLettre ALTER iemplId I
>
>
>
>bernhart
>
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform