General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Here is another possible solution:
Assuming you have a unique key for each person, create a table of names and unique keys
select namekey, name1 as name from yourpeopletable;
union;
select namekey, name2 as name from yourpeopletable;
union;
select namekey, name3 as name from yourpeopletable;
union;
select namekey, name4 as name from yourpeopletable;
into table allnames
parse the NameField into individual names (NameA, NameB, NameC, NameD) and then execute
one of four select statements depending on the number of names in the search field. Here
is the query for 4 names
SELECT namekey FROM allnames where name = &NameA AND namekey in (;
SELECT namekey FROM allnames WHERE name = &NameB AND namekey in (;
SELECT namekey FROM allnames WHERE name = &NameC AND namekey in (;
SELECT namekey FROM allnames WHERE name = &NameD)))
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only