Hi Guy
II need to create a store procedure which will push data from a view to table ( this table keeps historic data ),
I have the view below (this is an example)
System Name Group Report date T_NAME C_NAME U_NAME
solid 1 21/09/2017 aaa bbb ccc
solid 2 22/09/2017 aab aac aar
I need to push data across from this view to the table ( which has the field name System Name,Group,Report date,Field name,Field data,Field Measure)Because the view has more fields than the table , the Field name,Field data Field Measure will store the new data .
The new store proc will need to take the system name, Group and report data from the view and insert it into the table and also insert t_name into Field name, t_name data into the field_data and a count of the data in the field measure , this needs to be repeated for c_name and U _name
The table should look like this after ( using the above view example
System Name Group Report date Field name Field data Field Measure
solid 1 21/09/2017 T_NAME aaa 1
solid 2 22/09/2017 T_NAME aab 1
solid 1 21/09/2017 C_NAME bbb 1
solid 2 22/09/2017 C_NAME aac 1
solid 1 21/09/2017 U_NAME ccc 1
solid 2 22/09/2017 U_NAME aar 1
Can this be done?
My stored proc knowledge isn’t very good I would be grateful for any help.
Thank you guys