I am creating a table for license, which is made up of 2 attributes from one table and one from the other. The license type and customer is in the main customer table and License_ID in another, as only certain types of customers can have a License_id.
I want to create a License table which has a primary key of License number and then the types and customer_ids for that License number.
This error occurs when trying to create the table, I am trying to do it so when the table is created it only takes the License_number's which are not 0/null. I also want to make the License_number the primary key, as well as the foreign key and the other 2 attributes foreign keys.
How can I do this?
CREATE TABLE License AS SELECT
DISTINCT License_number, License_type, cust_id
FROM yoda_60
WHERE License_number !=0;
Error report -
ORA-01722: invalid number
01722. 00000 - "invalid number"
*Cause: The specified number was invalid.
*Action: Specify a valid number.