SQL Server Performance Forum – Threads Archive
Log changes in columns into Audit tableIn my application, i have two tables similar in structure say(for example) trans_detail and trans_detail_tmp.
Now, for a trans_id i need to compare the each and every field value in the both
tables and write to another table if any changes were found. for ex: select ‘1’ a,’2′ b,’3′ c from dual
select ‘1’ a,’4′ b,’6′ c from dual i get the following result A B C
– – –
1 2 3 i need that other table to contain the following rows. In need query [WITHOUT using triggers] for this column_name old_val new_val
b 2 4
c 3 6
Please Help ~!!!!
Is this for oracle application or SQL Server. dual is coming form orcle ?? —————————————-
Cast your vote
Sorry, This is for SQL SERVER….would like to get a SQL SERVER query to achieve this … Thanx in advance