Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
'Too many subqueries' error in SFReports
Message
From
15/04/2000 02:53:22
Jill Derickson
Software Specialties
Saipan, CNMI
 
 
To
14/04/2000 11:00:42
General information
Forum:
Visual FoxPro
Category:
Stonefield
Miscellaneous
Thread ID:
00359635
Message ID:
00359988
Views:
14
Hi Doug,

The RI looks ok to me, but, oc, I very easily could be missing something.

>Do the following: after the error occurs, go to the Command window and type: MESSAGEBOX(_screen.ActiveForm.oQuery.cSQLSelect).

It seems that a number of tables that I wouldn't THINK would appear in this query are there...other tables related to Defendants.
select PEOPLE.LAST,PEOPLE.FIRST,COURTCASES.CASENUMBER,ARRESTWARRANTS.DATE,UPPER(PEOPLE.LAST) from PEOPLE inner join DEFENDANTS on PEOPLE.PERSONID=DEFENDANTS.PERSONID inner join ARRESTWARRANTS on DEFENDANTS.DEFENDANTSID=ARRESTWARRANTS.DEFENDANTSID inner join CHARGES on DEFENDANTS.DEFENDANTSID=CHARGES.DEFENDANTSID inner join OFFENSEDEFS on CHARGES.OFFENSECODE=OFFENSEDEFS.CODE inner join INCHARGES on OFFENSEDEFS.CODE=INCHARGES.OFFENSECODE inner join INDEFENDANTS on INCHARGES.INDEFENDANTSID=INDEFENDANTS.INDEFENDANTSID inner join INCOMINGCASES on INDEFENDANTS.INCOMINGCASESID=INCOMINGCASES.INCOMINGCASESID inner join AAGSDEFS on INCOMINGCASES.AAGCODE=AAGSDEFS.CODE inner join CASEAAGS on AAGSDEFS.CODE=CASEAAGS.AAGCODE inner join COURTCASES on CASEAAGS.COURTCASESID=COURTCASES.COURTCASESID where ARRESTWARRANTS.ARRESTED={//} order by 5
Here is some additional info.

Court Cases (primary key is COURTCASESID) related to:
Defendants (primary key is DEFENDANTSID) related to:
People (Name - primary key is PERSONID)
Arrest Warrants (Date Issued, Date Arrested - primary key is DEFENDANTSID)

And yes, Defendants is also related to Charges (and Charges to OffenseDefs and incharges to inDefendants, etc.) but this looks totally screwed up to me...there isn't even a join between CourtCases and Defendants. What do you think?

TIA, J
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform