problem in with clause: if table1 is empty select from table2

From: <nova1427_at_gmail.com>
Date: Sun, 30 Mar 2008 00:48:03 -0700 (PDT)
Message-ID: <ca897ca4-6a5a-44a1-818b-9f30759b14c6@p25g2000hsf.googlegroups.com>


Please help me to write query like this

WITH table_not_empty AS
(

   if (SELECT * FROM Table1) is not empty return it_self    else return (SELECT * FROM Table2)
) Received on Sun Mar 30 2008 - 02:48:03 CDT

Original text of this message