|
Log in |
FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
SQL query to search on a field that is "similar to a set" or "mask"?
Is it possible to use an SQL query to search on a field that is
"similar to a set" or "mask"? Right, I know nothing of SQL. Am using D7 and v1.07/8. But if v2 is required, it would be enough reason to upgrade. :-) Below is best way I know to explain my question. for example table fields: GroupNum FirstName ASet ----proc/function var TargetName : String[15]; ANum : Integer; Found : Boolean; WorkSet : set of char; begin ANum := 1; TargetName := 'Bozo'; WorkSet := ['C']; //say a table record exists with fields containing: // 1 for GroupNum // Bozo for FirstName // ABC for ASet - or maybe A-O, etc for ASet Found := MyTable.Locate('GroupNum;FirstName;ASet', VarArrayOf([ANum,TargetName,WorkSet]), [loPartialKey,loCaseInsensitive]); //?? a query instead of table.locate ?? if Found then //do stuff end; --- My ASet/WorkSet field is the challenge. The table holds 1 to several records with same group number and same for FirstName and could hold more than one record with same ASet value. I only need to find "a" record that matches the search. i.e. if more than one exists finding the first is fine, just need to find a record. I've not yet created the third field. That is the challenge. The 3rd field needs to be able to hold a single char, several chars or a range of chars. If necessary, this range "could" be listed char by char instead. In any case, the query against the 3rd field, must only be "one" char where the field might hold several chars. I'm interested in any solution. Thanks for any help. Regards, Jim -- |
#2
|
|||
|
|||
Re: SQL query to search on a field that is "similar to a set" or "mask"?
> I've not yet created the third field. That is the challenge. The 3rd
> field needs to be able to hold a single char, several chars or a > range of chars. If necessary, this range "could" be listed char by > char instead. Can you show actual examples of what you mean here? -- Eivind Bakkestuen Nexus Database Systems |
#3
|
|||
|
|||
Re: SQL query to search on a field that is "similar to a set" or "mask"?
Hi,
Thanks, showed the best example of what I meant. <G> Granted it was perhaps a poor example. But if a good example could have been shown I would have known how to solve the puzzle. In any case was a pitifully elementary question. Am past that now and moving on. I appreciate the response. Cheers, Jim -- |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ANN: RTC Portal 2.0 - "Early Bird" offer expires in 2 days | Danijel Tkalcec | nexusdb.public.support.thirdparty | 0 | 30th July 2007 04:05 AM |
ANN: Multi DBMS tool "Database Workbench" version 2.8.7 released | Martijn Tonies | nexusdb.public.support.thirdparty | 0 | 14th June 2006 07:04 PM |
ANN: SuperFastDistinct! -- 5x, 10x, 100x faster than TnxQuery's "Select Distinct column..." | Barry | nexusdb.public.support.thirdparty | 0 | 26th April 2006 02:49 AM |
Using DELETE in stored proc "Unkown column error" | Dennis Esmonde-White | nexusdb.public.support.sql | 3 | 29th March 2006 06:12 AM |
Announcment! "The Keep" ver 2.0.0.1 and "Po Boy Application LifeCycle Management Utility" ver 1.0.0.l are now both available for free download! | Robert Meek | nexusdb.public.support.thirdparty | 1 | 11th July 2004 10:23 AM |