I
I
ivandao2019-10-16 16:11:45
Oracle
ivandao, 2019-10-16 16:11:45

Are there ways to translate the cell value into a field name?

Is there any way to translate cell value with field name?
There is a table:
_______________________________________________
| ID | name | email | address |
-------------------------------------------------- ----
| 1 | alex | [email protected] | new york |
-------------------------------------------------- ----
| 2 | maria | [email protected] | London |
-------------------------------------------------- ----
I store her history in this way:
_______________________________________________________________
| ID | USER_ID | field | address | date_edit |
-------------------------------------------------- ---------------------
| 1 | 2 |   address     | Moscow | |
-------------------------------------------------- ---------------------
| 2 | 1 |     email      | [email protected] | |
-------------------------------------------------- ---------------------

spoiler
maria сменила адрес на Moscow
alex сменил email на [email protected]

I want to abandon the first table and store only the history of changes for each field (the second table) and calculate the current (actual) user data values ​​​​(last change) on the fly through the View.
To do this, I need to use the value as a field (address, email).
How can I do that?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
TheRonCronix, 2019-10-17
@ivandao

https://www.oracle.com/technical-resources/article...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question