Possible Duplicate:
SQL CASE statement
Hi Frdz, i have created a stored proc and i put three queries in stored proc with inputvariable @EtlLoadId = 0 and i get three different windows for each query under result tab. is there any chance i can get results from the stored proc (results of three queries) as only one window and results one below another under result tab ?
IF (SELECT EtlLoadId
FROM ssislogs.audit.processcontrol
WHERE SubjectArea = 'UaqaFacetsImp') > 0
SELECT pc.SrcFileName + ' - '+ CONVERT(VARCHAR(10), pc.[RecordCount] ) AS FacetsImpCount
FROM ssislogs.audit.processcontrol pc left outer join
Uaqa.LettersAndCardsExports lc
on pc.etlloadid = lc.etlloadid
WHERE pc.subjectarea = 'UaqaFacetsImp'
ELSE
SELECT 'No input file' AS FacetsImpCount
SELECT pc.subjectarea AS FacetsRjctFile
FROM ssislogs.audit.processcontrol pc left outer join
Uaqa.LettersAndCardsExports lc
on pc.etlloadid = lc.etlloadid
WHERE pc.subjectarea = 'UaqaFacetsRjct'
SELECT pc.subjectarea AS FacetsPvsFile
FROM ssislogs.audit.processcontrol pc left outer join
Uaqa.LettersAndCardsExports lc
on pc.etlloadid = lc.etlloadid
WHERE pc.subjectarea = 'UaqaFacetsPvs'
Thanks