Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cros Tab
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01011056
Message ID:
01011562
Views:
14
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--
Previous
Reply
Map
View

Click here to load this message in the networking platform