sql:SELECT ParameterName, ParameterValue FROM [dbo].[TABLENAME] WHERE ParameterName IN ('ExportFilePath','SystemSource','RecordsPerFile')
ParameterName | ParameterValue |
ExportFilePath | E:\ETL_cloud_output\UAT\ExportFiles\ |
RecordsPerFile | 25000 |
SystemSource | CuratedZone |
行转列sql:
SELECT ExportFilePath,SystemSource,RecordsPerFile
FROM (SELECT ParameterName, ParameterValue FROM [dbo].[TABLENAME]) PC
PIVOT(MAX(ParameterValue) FOR ParameterName IN (ExportFilePath,SystemSource,RecordsPerFile)) AS PVT
ExportFilePath | SystemSource | RecordsPerFile |
E:\ETL_cloud_output\UAT\ExportFiles\ | CuratedZone | 25000 |