• rahulsony111 (12/21/2009)


    I am trying this from 5 hrs and unable to get a solution.

    In target table i have that column as numeric.

    I tried getdate() with datatype databasedate but it is returning 2009-12-21. So that value is not going into target table sand saying it as invalid number.

    I want it ti look like 20091221, only then it goes into targat table

    As mentioned in one of the other threads where you asked the "same" question, and since you seem fixed on storing the date as an integer, in SQL:

    cast(convert(varchar(8), getdate(), 112) as int)