ACE Report problem
Posted in 1994
Topics: Performance & Tuning
I want to scream, really. Hello everyone. I'm hoping that there's someone out here who can point out where I'm screwing this darned thing up. I've got a report that I'm trying to run through ACE and I USED to have it working but then I had to rewrite it and now it's failing. I'm stuck with Informix V2.10.00B right now (please, no Flames, I don't have a choice) Here's the problem: Table 1 - Customer: customer_id serial; [Other fields] Table 2 - Problem: customer_id integer; (Points to same above) modid serial; report_date date; synopsis text(short); [Other fields] Table 3 - Misc: modid integer; (Points to same above) description text(long); There may NOT be an entry in table 3 for each occurance of table 2 but there will be a table 2 for any table 3. Also, there WILL be a table 1 entry for any table 2 entry. There CAN be multiple table 2s for any table 1 (I know you know that but I thought I'd say it anyway) What I have tried to do is search for any occurance of a "string" in misc.description, then, if found, return the table 2 that it goes with and the table 1. Now, if there's no "string" in Misc, search Problem (T2) for it and if found, return the problem and the customer information. I was using a select like this: select [Assorted fields] from customer, problem, outer misc where customer.customer_id = problem.customer_id and problem.rdate > "1.1.92" and ( ( problem.modid = problem.modid and misc.description like "%timeout%" ) or problem.synopsis like "%timeout%" ) I was aiming for: Search all problems > the first of 1992 for the word "timeout" and if found, report it and the customer info. If the word was found in the associated table "misc" (which may NOT have an entry, report it) The problem is that this is NOT finding the entries that it should. I'm using very hard wired entries, forcing it to find ones I know exist (I've done the presearches by hand to prove it) but each time I try, it never seems to use the 'outer' table correctly, it seems to either find ANY entry in 'misc' which has the same "modid" as a problem entry or it doesn't report a "problem" entry because it doesn't have a "Misc" entry attached to it. My question is, what the HECK AM I DOING WRONG? I suspect that this is a case of looking too closely. If people wish to, reply via email and I'll summarize to the net. Thank you in advance for any information/hints/words of support that you wish to offer. And thank you for your time. -- << MCT >> mtiernan@world.std.com Michael C Tiernan. GEnie: M.Tiernan Boston Computer Society member AOL: M Tiernan or BCS Mike Is God a performance artist?