Re: CASE returning multiple values (was SQL Help)
От | Richard Huxton |
---|---|
Тема | Re: CASE returning multiple values (was SQL Help) |
Дата | |
Msg-id | 200305301740.06691.dev@archonet.com обсуждение исходный текст |
Ответ на | SQL Help (C F <tacnaboyz@yahoo.com>) |
Ответы |
Re: CASE returning multiple values (was SQL Help)
Re: CASE returning multiple values (was SQL Help) |
Список | pgsql-sql |
On Friday 30 May 2003 4:47 pm, C F wrote: > Hello, > I already tried this same basic question with no response.... maybe I was > too wordy. I think it's more a case of nobody seeing a better way. > select > (case when column1 = column2 then column3 end) as alias1, > (case when column1 = column2 then column4 end) as alias2, > (case when column1 = column2 then column5 end) as alias3, > (case when column6 = column7 then column8 end) as alias4 You could write a set returning function, but you'd just end up doing the same thing. Can you explain what it is you're trying to acheive - real fields/schemas etc? -- Richard Huxton
В списке pgsql-sql по дате отправления: