Table 1st :
---------------------------------------
Column_A Column_B
---------------------------------------
Test A name
Test B address
Test C phone
Table 2nd :
-------------------------------------------------------------------
name address email country phone
-------------------------------------------------------------------
Kush KTM a@a.c NP 98545
2nd table is a temporary table and will hold single row only.
Output required :
---------------------------------------
Column_A Val
---------------------------------------
Test A Kush
Test B KTM
Test C 98545
I tried pivoting 2nd table, but since its gonna be table with dynamic number of columns, it will be complicated.
Is there any other alternative ?