Forum Replies Created

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

  • RE: Substracting dates to give year.

    Declare @birth datetime,

     @diagnost datetime 

    Select @birth='19500312',

     @diagnost='20061101'

    Select DateDiff(year,@birth,@diagnost)

  • RE: Differenc between two record sets

    Declare @Table Table(Date datetime,client int, A int)

    Insert Into @Table Values ('2006-11-01', 1,      100)

    Insert Into @Table Values ('2006-11-02', 1,      110)

    Insert Into @Table Values ('2006-11-03', 1,      140)

    Select *

    From

    (

    Select  Date,

     client,

     T.A-(Select Top 1...

  • RE: Getting the most recent record

    SELECT          t.PupilID,

                            (SELECT  Top 1 CourseID FROM Test...

  • RE: Help in query

    -- sum must be <8000

    Declare @result varchar(8000)

    Select @result=''

    Select @result=@result+Color+','

    From #Temp

    if Len (@result)>0

     Select @result=Substring(@result,1,Len(@result)-1)

    Select @result

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