Q:

SQL Server 2012. Copy row into single column on another table

I am working with SQL Server on the AdventureWorks2012 Database.  I am working with triggers. I would like to copy any new inserted row into one single column in another table called AuditTable. Basically whenever I insert into the parson.address table, I would like to copy all of the rows into the AuditTable.prevValue column. I know how to insert etc, I am not sure how to write to one column. 
Here is the general idea. 
USE [AdventureWorks2012]

ALTER TRIGGER [Person].[sPerson] ON [Person].[Address]

 FOR INSERT AS INSERT INTO AdventureWorks2012.HumanResources.AuditTable(PrevValue) select 
 AddressID,AddressLine1,AddressLine2,City, StateProvinceID, PostalCode, SpatialLocation, rowguid, ModifiedDate FROM Inserted

ERROR: The select list for the INSERT statement contains more items than the insert list. The number of SELECT values must match the number of INSERT columns.

Thank you for any assistance. I have searched loads but cannot find the exact solution anywhere.

A:

The error message says it all - you can't insert 9 columns of different types into a single column. Assuming that your destination AuditTable.PrevValue column is NVARCHAR(), you could flatten your insert as follows, by concatenating the columns and casting non-char columns to n*char:
 INSERT INTO AdventureWorks2012.HumanResources.AuditTable(PrevValue) 
 SELECT 
    N'ID : ' + CAST(AddressID AS NVARCHAR(20)) + N'Address: ' + AddressLine1 + 
    N', ' +AddressLine2 + ....
 FROM Inserted

IMO keeping one long string like this makes the Audit table difficult to search, so you might consider adding SourceTable and possibly Source PK columns.
You could also consider converting your row to Xml and storing it as an Xml column, like this:
create table Audit
(
     AuditXml xml
);

alter trigger [Person].[sPerson] ON [Person].[Address] for INSERT AS
begin
    DECLARE @xml XML;
    SET @xml =  
    (
      SELECT *
      FROM INSERTED
      FOR XML PATH('Inserted')
    );
    insert into [MyAuditTable](AuditXml) VALUES (@xml);
end

