I am trying to create a new file from fields extracted from a larger file that contains two memo fields. I wrote a sql program that queries and extracts the fields I need for my new file. The routine works fine except the two memo fields are empty. Does anyone have a solution?
SELECT Service.sproblem, Service.swrkst, Service.smec_num, Service.misc2,;
Service.svcorder, Service.custcode, Employee.last, Employee.Emplcode;
FROM sds!service, sds!Employee;
WHERE Employee.Emplcode = Service.smec_num ;
ORDER BY Service.custcode, Service.svcorder, Service.swrkst ;
into dbf TMPSERV.dbf readwrite
SELECT TMPSERV
SCAN
M.SPROBLEM = TMPSERV.SPROBLEM
M.swrkst = TMPSERV.swrkst
M.smec_num = TMPSERV.smec_num
M.MISC2 = TMPSERV.MISC2
M.svcorder = TMPSERV.svcorder
M.CUSTCODE = TMPSERV.CUSTCODE
M.EMP_LAST = TMPSERV.LAST
SELECT MBLSERV
GO BOTTOM
APPEND BLANK
GATHER MEMVAR
=TABLEUPDATE(.T.)
SELECT TMPSERV
ENDSCAN
SELECT Service.sproblem, Service.swrkst, Service.smec_num, Service.misc2,;
Service.svcorder, Service.custcode, Employee.last, Employee.Emplcode;
FROM sds!service, sds!Employee;
WHERE Employee.Emplcode = Service.smec_num ;
ORDER BY Service.custcode, Service.svcorder, Service.swrkst ;
into dbf TMPSERV.dbf readwrite
SELECT TMPSERV
SCAN
M.SPROBLEM = TMPSERV.SPROBLEM
M.swrkst = TMPSERV.swrkst
M.smec_num = TMPSERV.smec_num
M.MISC2 = TMPSERV.MISC2
M.svcorder = TMPSERV.svcorder
M.CUSTCODE = TMPSERV.CUSTCODE
M.EMP_LAST = TMPSERV.LAST
SELECT MBLSERV
GO BOTTOM
APPEND BLANK
GATHER MEMVAR
=TABLEUPDATE(.T.)
SELECT TMPSERV
ENDSCAN