Sub-Select in CASE
От
Brian C. Doyle
Тема
Sub-Select in CASE
Дата
Msg-id
5.1.0.14.2.20020401124436.02aaf1c0@proxy
Список
Hello all, I am trying to run a query that checks to see if a mail box exist in a db. If the mail box does not exist i need it to return another address. Currently I am working with : SELECT CASE WHEN alias.mbox='brian' THEN alias.email_add ELSE (SELECT alias.email_add WHERE alias.mbox='*' AND alias.domain='domain.com) END WHERE alias.domain='domain.com' and alias.mbox='brian'; I am not even sure if Case is the best choice. More background info on it, this is for and db that EXIM enter acts with and i want to be able to setup a default alias.
В списке pgsql-sql по дате отправления