Select MIN of a column

  • I have a RAW data source with Sales and Date column. So, I want to assign the min(Date) to all the records using ssis only.

    e.g.

    create table temp(sales int, date datetime)

    insert into temp select 5,'11-12-2011'

    insert into temp select 6,'5-12-2011'

    insert into temp select 7,'12-12-2011'

    insert into temp select 8,'1-1-2010'

    so the output should be

    5,,'1-1-2010'

    6,'1-1-2010'

    7,'1-1-2010'

    8,'1-1-2010'

    We cant use Min, Max functions in Derived Column transformation..so how to achieve this?

    Please help guys..Thanks in advance

  • Please don't cross post. It just wastes peoples time and fragments replies.

    No replies to this thread please. Direct replies to: http://www.sqlservercentral.com/Forums/Topic1157392-148-1.aspx

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

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

You must be logged in to reply to this topic. Login to reply