In the following Pivot query (which works except for this problem), one of the key values (
SELECT dimOriginKey,Address/Media,Lottery,NumContactsProcessed,CostRound,Campaign,Supplier,Cost,NumContacts FROM
SELECT dimOriginKey,measureValueNum,measureKey FROM dimOrigin o
JOIN dimOriginMeasure om ON o.originSNKey = om.originSNKey
WHERE om.measureValueMissing = 'n' AND om.measureValueNum IS NOT NULL
) src PIVOT
FOR measurekey IN (Address/Media,Lottery,NumContactsProcessed,CostRound,Campaign,Supplier,Cost,NumContacts)
Incorrect syntax near '/'.
Enclose your column names with square brackets -
[Address/Media]. This tells SQL Server that everything in between is to be treated as the column/table name and not as an operator.