selectduplicates
FORMULA
The selectduplicates statement selects records containing duplicate information in the database.
Parameters
This statement has one parameter:
formula – tells Panorama what data to check for duplicates. If the formula is empty (""
) Panorama will check in the current field. If the formula is not empty the formula will build the data that is actually checked for duplicates. For example to look for records where both the first name and last name are duplicated, the formula would be FirstName+" "+LastName
.
Description
This statement selects records containing duplicate information in the database. To work properly, the database must be sorted according to the formula used (see the examples below).
This example selects records with duplicate check numbers.
field «Check#»
sortup
selectduplicates ""
This example selects all records with duplicate names (both first and last name must be duplicated).
field LastName
sortup
field FirstName
sortupwithin
selectduplicates LastName+", "+FirstName
Error Messages
SelectDuplicate Error: Data is out of order, please sort the data and try again. – Before using the selectduplicates statement, you must sort the data to ensure that all of the duplicate data is adjacent. As this statement looks for duplicates, it checks to make sure that the data is sorted in the correct order. If it isn’t, you’ll see this error message. Make sure that the database is sorted in the correct order before searching for duplicates.
See Also
- checkemptyselection -- notifies the user if a selection failed, and reverts to the previous selection.
- Date Search Options -- searching dates within a database.
- Favorite Searches -- saving and recalling favorite searches.
- find -- locates the first visible record in the active database for which the specified condition is true.
- Find & Replace Dialog -- finding and replacing a word, phrase or regular expression.
- Find/Select Dialog -- using a dialog to search for specific data.
- findabove -- locates the next previous record (above the current record) in the active database for which the specified condition is true.
- findbackwards -- locates the last visible record in the active database for which the specified condition is true.
- findbelow -- locates the next visible record (below the current record) in the active database for which the specified condition is true.
- findid -- locates a record in the active database by its ID number (see info("serverrecordid").
- findnth -- finds the nth (2nd, 3rd, 4th, etc.) record that matches a true-false test.
- findselectdialog -- opens the standard *Find/Select* dialog.
- Formula Search -- searching with a formula.
- ifselect -- combines the select and if info("empty") operations into a single statement.
- info("empty") -- returns true or false depending on the result of the last select operation. If no records were selected the function will return true, otherwise it will return false.
- info("found") -- returns true or false depending on whether the last *find* or *next* statement was successful.
- nextmatch -- locates the next visible record in the active database for which the condition specified in the most recent Find statement is true.
- Numeric Search Options -- searching numbers within a database.
- pleaseselectall -- makes sure that all records are selected.
- previousmatch -- locates the previous (closer to the top) visible record in the active database for which the condition specified in the most recent Find statement is true.
- Record Search Options -- searching via record attributes.
- Refining a Selection -- refining a selection.
- removeselected -- deletes all selected records from the database.
- removeunselected -- deletes all unselected records from the database.
- search( -- searches through an item of text looking for a character, word or phrase. If it finds an exact match (including upper/lower case) with the character, word or phrase it returns its position within the text item. If it does not find the character, word or phrase it returns zero.
- searchanycase( -- searches through an item of text looking for a character, word or phrase. If it finds a match (upper/lower case may be different) with the character, word or phrase it returns its position within the text item. If it does not find the character, word or phrase it returns zero.
- Searching -- searching a database to find or select information.
- select -- makes visible only those records for the active database for which the specified condition is true.
- selectadditional -- adds unselected records to a previously selected group if they match the true-false test.
- selectall -- makes every record in the database visible.
- Selecting with the Context Menu -- searching for information related to the current cell.
- selectreverse -- makes every visible record invisible, and every invisible record visible.
- selectwithin -- uses a Boolean formula to exclude records from a previously selected group.
- Text Search Options -- searching text within a database.
History
10.0 | No Change | Carried over from Panorama 6.0. |