The table name appears twice in the list that follows the word FROM. Review the statement to see if you intended to name some other table the second time. If you intended to join a table to itself, use a table alias for the second and subsequent instances of the table. The following example shows one way to find customers with the same last name:
SELECT main.lname, main.customer_num, sub.customer_num FROM customer main, customer sub WHERE main.lname = sub.lname AND main.rowid != sub.rowid
When you use table aliases (the words main and sub in the example), the table may be selected from two or more times.