crewchiefpro6
Programmer
I have a sql to cursor that works great but when I try to append the cursors to a regular dbf only one will work, the other one appends only blank records.
Here are the select statements, can someone point out what stupid thing I am doing wrong with the second select.
Please note that both contain correct records in a browse statement right after they are populated, it is just that the append fails on the second cursor.
I have verified that the structure is exactly the same on both. The only difference with the second cursor is the field headings have an A after the regular headings.
SELECT TOP 250 * ;
FROM csrAnswer ;
WHERE csrAnswer.iquarter >= csrAnswer.idialin ;
ORDER BY iquarter ;
GROUP BY carnumber ;
INTO CURSOR csrqualifying NOFILTER
*!* WAIT WIND "Top " + STR(_TALLY)
*!* IF _TALLY > 0
*!* **Browse Normal NoCaption
*!* ENDIF
SELECT TOP 250 * ;
FROM csrAnswer, csrqualifying ;
WHERE csrAnswer.carnumber NOT IN(SELECT carnumber FROM csrqualifying) ;
.AND. csrAnswer.iquarter < csrAnswer.idialin ;
ORDER BY csrAnswer.iquarter DESC ;
GROUP BY csrAnswer.carnumber ;
INTO CURSOR csrQualifyingBottom READWRITE
browse normal
** this shows correct information
IF USED("bottom")
SELECT BOTTOM
ELSE
SELECT 0
USE BOTTOM
ENDIF
ZAP
**** now assemble both cursors into one dbf so I can see the qualifying positions
APPEND FROM DBF("csrQualifying")
APPEND FROM DBF("csrQualifyingBottom")
Browse Normal NoCaption
Don Higgins
Here are the select statements, can someone point out what stupid thing I am doing wrong with the second select.
Please note that both contain correct records in a browse statement right after they are populated, it is just that the append fails on the second cursor.
I have verified that the structure is exactly the same on both. The only difference with the second cursor is the field headings have an A after the regular headings.
SELECT TOP 250 * ;
FROM csrAnswer ;
WHERE csrAnswer.iquarter >= csrAnswer.idialin ;
ORDER BY iquarter ;
GROUP BY carnumber ;
INTO CURSOR csrqualifying NOFILTER
*!* WAIT WIND "Top " + STR(_TALLY)
*!* IF _TALLY > 0
*!* **Browse Normal NoCaption
*!* ENDIF
SELECT TOP 250 * ;
FROM csrAnswer, csrqualifying ;
WHERE csrAnswer.carnumber NOT IN(SELECT carnumber FROM csrqualifying) ;
.AND. csrAnswer.iquarter < csrAnswer.idialin ;
ORDER BY csrAnswer.iquarter DESC ;
GROUP BY csrAnswer.carnumber ;
INTO CURSOR csrQualifyingBottom READWRITE
browse normal
** this shows correct information
IF USED("bottom")
SELECT BOTTOM
ELSE
SELECT 0
USE BOTTOM
ENDIF
ZAP
**** now assemble both cursors into one dbf so I can see the qualifying positions
APPEND FROM DBF("csrQualifying")
APPEND FROM DBF("csrQualifyingBottom")
Browse Normal NoCaption
Don Higgins