Quantcast
Channel: SCN : Unanswered Discussions - SAP HANA and In-Memory Computing
Viewing all articles
Browse latest Browse all 4343

Dynamic Trigger update to column

$
0
0


Hello Experts,

 

I have two tables. Table A with many columns for each Symptom and Table B with one column for Symptom. If the input 'FEVER' is inserted into TableB Symptom column, I would like to set up a trigger which automatically puts a 1 value into Table A's Fever Column. I know I can write an if statement:

If tableB.symptom=FEVER

then insert into tableA.FEVER (-1)

But there can be many symptoms and this if statement would drag on and I'm thinking their is a better way.

How would I go about doing this? Would I use a Stored Procedure?

 

thanks,

Connor


Viewing all articles
Browse latest Browse all 4343

Trending Articles



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