DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   MS SQL (http://www.daniweb.com/forums/forum127.html)
-   -   Sub-Select (http://www.daniweb.com/forums/thread121566.html)

HugoCore Apr 29th, 2008 12:23 pm
Sub-Select
 
Hi,

How-To for example:

SELECT * FROM table WHERE columname > '2'

FROM THOSE WHERE columname > '4'

FROM THESE LAST WHERE columname > '6'

Thank you very much,

Core regards :)

huangzhi May 1st, 2008 12:09 am
Re: Sub-Select
 
select top 1 *
  from (select *
            from (select * from table where columname > '2') X
            where columname > '4') Y
  where columname > '6'
  order by columname desc


All times are GMT -4. The time now is 3:22 am.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC