Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Table from Vertical to horizontal
Message
 
 
À
08/12/2008 13:38:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01365804
Message ID:
01366141
Vues:
10
Hi Ounis,

Try to re-write the last step as
local lcField as String
select Report
set order to id_a
scan
     if not seek(ID_a, 'c_FinalResult')
          insert into c_FinalResult (iID_a, cStudentName) values (Report.ID_a, Report.Name)
    endif
    lcField = strtran(alltrim(Report.subject)," ","_")

    replace (lcField) with Report.Mark in c_FinalResult
endscan
>Hello Naomi
>I think it is working but there is something that I could found were is this error
>on line 18 telling that the varialble subject is not found
>I promise I will not disturb you after this.
>Best Regards
>
>select distinct strtran(subject," ","_") as Subject from report
> local lcSubjects, lnCount
>lcSubjects = ""
>select c_UniqueSubjects
>lnCount = 0
>scan
>lcSubjects = "," + Subject + "I"
>endscan
>create cursor c_FinalResult (iID_a I, cStudentName C(40) &lcSubjects)
> && If this would not work, we can construct the whole create cursor command as a string
>index on iID_a tag iID_a
>
>select Report
> set order to id_a
>scan
>if not seek(ID_a, 'c_FinalResult')
>insert into c_FinalResult (iID_a, cStudentName) values (Report.ID_a, Report.Name)
>endif
>replace (Subject) with Report.Mark in c_FinalResult &&Variable subject is not found
>endscan
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform