I have an application (apex)which truncates the load the data into following table from spreadsheet.
When it truncates and load, I need to ensure that the value of a column doesnt exist in another table
Lets say the spread has 2 columns below:
the app should truncate and insert above records into TAB_A.
I have another table TAB_B with following columns:
But if any of the value of COL A in the spreadsheet exists in TAB_B, it should abort inserting any records and throw the value to the application which already has this value( in this case A)
Please let me know if this can be done using a trigger?