My problem is all attempts to exclude data listed in the info table have met w/ failure. My problem is further complicated as it takes almost 2 hours to complete a search (if it doesn't time out first) due to other activity on the server. I can get off some searches early in the morning, but all of my variations in trying to exclude these terms have failed. I have tried 'not like' or '!=' and neither works. I have mocked up a script below which shows what I am trying to do
Let's say I am trying to return as a result from the database all of the names of all the owners of Briggs and Stratton mowers sold which are not 30 HP and which were sold by SEARS. No problem getting all of the target mowers and excluding the 30 HP ones (incidentally, the actual database has nothing to do w/ mowers).
Needless to say this is getting a bit frustrating.
My database has 3 tables; name, main & info.
Name contains a unique ID number; id and the owners name; name
Main contains the unique ID number; id, filedat,
Info contains the unique ID number; id, the manufacter; manu, horse power; hp, & store
1 select unique(name),no,filedat,manu,model,store
2 from info e, main m, name p
3 where e.id=m.id and m.id=p.id
4 and hp not like '%30%'
5 and (manu like '%BRIGGS%' or manu like '%STRATTON%')
6 and (store != 'JOES' or store != 'KMART'
7 or store != 'HOMEDEPOT' or store != 'HECHINGERS')
8 order by name,model;
Tried many variations to the syntax with wildcards, w/o wildcards, spaces bteween the brackets and the excluded terms and I still return all of the records. I am open to any suggestions
Let's say I am trying to return as a result from the database all of the names of all the owners of Briggs and Stratton mowers sold which are not 30 HP and which were sold by SEARS. No problem getting all of the target mowers and excluding the 30 HP ones (incidentally, the actual database has nothing to do w/ mowers).
Needless to say this is getting a bit frustrating.
My database has 3 tables; name, main & info.
Name contains a unique ID number; id and the owners name; name
Main contains the unique ID number; id, filedat,
Info contains the unique ID number; id, the manufacter; manu, horse power; hp, & store
1 select unique(name),no,filedat,manu,model,store
2 from info e, main m, name p
3 where e.id=m.id and m.id=p.id
4 and hp not like '%30%'
5 and (manu like '%BRIGGS%' or manu like '%STRATTON%')
6 and (store != 'JOES' or store != 'KMART'
7 or store != 'HOMEDEPOT' or store != 'HECHINGERS')
8 order by name,model;
Tried many variations to the syntax with wildcards, w/o wildcards, spaces bteween the brackets and the excluded terms and I still return all of the records. I am open to any suggestions