Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

SQL Query help

$
0
0
Hi all,
I have 3 tables {unsaccountB and DialogColumn and DialogWatchProperty } that are somehow related to each other. UnsaccountB table has columns job, dept, Center...and DialogColumn tbl has a column named "columnName" that contains all the column names in unsaccountB table. And also unsaccountB tbl and DialogWatchProperty (contains historical column values) tbl are related with column named "objkey". My goal is to have an output like this:
How would I do that?


Code:

oldVal NewValue ColumnName
----------------------------------------------
oldVal1fromDialogWatchProperty  newVal1fromunsaccountB  Job
oldVal2fromDialogWatchProperty  newVal2fromunsaccountB  Dept
oldVal3fromDialogWatchProperty  newVal3fromunsaccountB  Center
...


Viewing all articles
Browse latest Browse all 13329

Trending Articles