|
|
Archives of the TeradataForum
Message Posted: Tue, 09 Oct 2012 @ 22:04:43 GMT
Subj: | | Re: Need to transpose a column to Row |
|
From: | | Myrna, James |
Not exactly what you are looking for, but close.
SELECT UserName, DatabaseName, TableName,
MAX(CASE AccessRight WHEN 'R' THEN 'Y' ELSE ' ' END) AS "SELECT",
MAX(CASE AccessRight WHEN 'I' THEN 'Y' ELSE ' ' END) AS "INSERT",
MAX(CASE AccessRight WHEN 'U' THEN 'Y' ELSE ' ' END) AS "UPDATE",
MAX(CASE AccessRight WHEN 'D' THEN 'Y' ELSE ' ' END) AS "DELETE"
FROM dbc.AllRights
GROUP BY 1,2,3
ORDER BY 1,2,3
Jim
| |