Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SELECT statement
Message
 
 
À
10/01/2007 11:09:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01184224
Message ID:
01184238
Vues:
17
>Hi All,
>
>I have this old code and I wanted to convert it. I have converted it as shown below. Please help.
>
>
>* Old Code...
>DO WHILE !EOF( )
>  C = RT1.RECNUM_55
>  R = CCRejectReasons.REASON
>  Skip
>  DO WHILE C = RT1.RECNUM_55
>    R = R + CHR( 13 ) + CCRejectReasons.REASON
>    Skip
>  ENDDO
>  INSERT INTO RT4( RECNUM_55, REASON ) VALUES( C, R )
>ENDDO
>
>* Here is mine...
>SELECT ;
>  RT.RECNUM_55 As C, ;
>  CHR(13) + CC.REASON As R ;
>FROM RT1 RT, CCRejectReasons CC ;
>INTO CURSOR RT4
>
You should show us a little bit more code preceding the original loop, but from the first glance these two are not equavalent. It looks like the original code tried to put multiple reasons into one record and your code is not going to do that. I'm not even sure you can achieve your goal in SELECT-SQL.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform