Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Table from Vertical to horizontal
Message
From
10/12/2008 03:55:22
 
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:
01366395
Views:
7
Dear Naomi,
The coding is now working properly and successfully, however I just want to share with you the following information and what exactly was wrong in the coding and how I fix it. maybe it is not the right solution but it is working perfectly.
the first part of the code you sent me was working properly, but the second one was working only for the first subject and then was not making the loop to create the other subject this is why at a certain time the error comes with variable not found. here I create a table using sql create table with only two field studentid and name after that I alter the table based on cursor c_uniquesubjects then I used the first line of the second part to be able to enter all students scan

if not seek(id_a, 'FinalTEST')
insert into FINALTEST(ID_a, FIRSTName) values (Report.ID_a, Report.Name)
ENDIF
ENDSCAN

Finaly I and sql query based on two tables the original one "report" and the table created through the code after that
I made just the replacement using the following:

SELECT C_UNIQUESUBJECTS
SET ORDER TO lfsubj && SUBJECT
GO TOP
SCAN
SELECT C_UNIQUESUBJECTS
LSUBJECT=ALLTRIM(SUBJECT)
SELECT FINALRESULT
REPLACE ALL &LSUBJECT WITH ALLTRIM(MARK) FOR SUBJECT="&LSUBJECT"
ENDSCAN

Maybe is little bit long but it is working without errors and I checked that all information are placed in the right fields.
Thank you so much Naomi and best regards
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform