Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

Is it possible to catch SQL exceptions?

$
0
0

Hi all,

I would like to catch SQL exceptions 301 - unique constraint violated when inserting data into a table. I've got a largish table to which I'm adding data from CSV files from time to time. Some of the new rows are duplicates of already present ones, this cannot be helped. I've tried to declare a trigger for the INSERT statement, however this does not seem to help. That is, a TRIGGER AFTER INSERT does not prevent the exception to be raised and a TRIGGER BEFORE cannot, at least so says the docs, access the table, so it cannot check if the insert will produce a 301. So is this possible in Hana at all?

 

Cheers,

 

-- Micha


Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>