Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)

  • RE: select query

    --sample Data

    declare @tbl table

    (

    id int

    ,field_1 date

    ,field_2 date

    ,field_3 date

    )

    insert into @tbl values(1,'20120823','20120824','20120825')

    --Query

    select max(a.mydate),a.id

    from (

    select...

  • RE: select query

    --Sample Data

    declare @tbl table

    (

    id int primary key

    ,field_1 date

    ,field_2 date

    ,field_3 date

    )

    insert into @tbl values(1,'20120823','20120824','20120825')

    --Query

    select max(a.mydate),a.id

    from (

    ...

Viewing 2 posts - 1 through 2 (of 2 total)