I am trying to write a report to select records that have a certain detail record in Goldmine 'PGDIPMGTST' but not another detail record 'MBA'. I have an SQL query that I have written in Goldmine itself that will do the job:
SELECT * FROM CONTACT1 WHERE Contact1.ACCOUNTNO IN (SELECT DISTINCT ACCOUNTNO FROM CONTSUPP WHERE (CONTSUPP.RECTYPE = 'P' AND CONTSUPP.CONTACT = 'Graduate' AND CONTSUPP.CONTSUPREF = 'PGDIPMGTST')) and contact1.accountno not in (SELECT DISTINCT ACCOUNTNO FROM CONTSUPP WHERE (CONTSUPP.RECTYPE = 'P' AND CONTSUPP.CONTACT = 'Graduate' AND CONTSUPP.CONTSUPREF LIKE '%MBA%'))
I cannot get a version of this query to work in stonefield. I have tried using the Advanced tab and executing part of this query in the "Specify Before data Code" area
SELECT * FROM CONTACT1,CONTSUPP WHERE CONTACT1.ACCOUNTNO NOT IN (select CONTSUPREF.ACCOUNTNO from CONTSUPP where CONTSUPREF like '%MBA%' and CONTSUPP.RECTYPE = 'P' and CONTSUPP.CONTACT = 'Graduate')
When this code runs it comes up with an error "contact1.dbf does not exist"
Any assistance appreciated.
For anyone from Stonefield reading this, it would help if your developers considered this issue. This is what I would have thought to be a simple task, yet it is very difficult in Stonefield.
|