Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Table from Vertical to horizontal
Message
From
09/12/2008 02:27:03
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01365804
Message ID:
01366155
Views:
7
Dear Naomi,
First thank you fo your help, I think the problem is in my table and not in the code if you look at the table structure
if it does not work it's ok I will have to look at another solution
Thank you again

fields type
studentid character(10)
subject character(20)
mark character(10)
and the code is like this latest



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)
index on iID_a tag iID_a
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform