Forum Replies Created

Viewing 15 posts - 3,481 through 3,495 (of 5,109 total)

  • RE: Next Quarter Dates

    SELECT DATEADD(QUARTER, DATEDIFF(QUARTER, 0, GETDATE()) +1, 0) AS QStart,
           DATEADD(DAY, -1, DATEADD(QUARTER, DATEDIFF(QUARTER, 0, GETDATE()) +2, 0)) AS QEnd;

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: Are the posted questions getting worse?

    Anyone having problems creating topics? I'm trying to post one and it just sits there for a few minutes, then I get an unknown error. Tried a few times.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: update column based on max date for each employee

    Eirikur Eiriksson - Wednesday, July 19, 2017 5:54 AM

    Piling on 😉
    😎

    ;WITH MAX_SET AS
    (
    SELECT
        FT.Employee_SID
     ,MAX(FT.Team_SID) AS MX_TSID
    FROM dbo.FactTable    FT
    GROUP BY FT.Employee_SID
    )
    UPDATE FT
        SET...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: update column based on max date for each employee

    Shanmuga Raj - Wednesday, July 19, 2017 5:27 AM

    can you help me with exact query
    my table is cdw.FactTable
     

    Rather than giving you...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: update column based on max date for each employee

    Your table is called FactTable. I used a temporary table in my example.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: update column based on max date for each employee

    Shanmuga Raj - Wednesday, July 19, 2017 4:58 AM

    Thom A - Wednesday, July 19, 2017 4:46 AM

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: update column based on max date for each employee

    Shanmuga Raj - Wednesday, July 19, 2017 4:33 AM

    I donot have access to change your database design. The above table have...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: Formatting in HTML table

    sqlenthu 89358 - Wednesday, July 19, 2017 4:17 AM

    Selectcase when RevAmtMax <0 then '<font color="red">' + '($'+replace(convert(varchar,convert(money,RevAmtMax,1), '.00','') +')' + '</font>'...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: How to get top and bottom rows from where condition

    Sangeeth878787 - Wednesday, July 19, 2017 4:18 AM

    Thom A - Wednesday, July 19, 2017 4:01 AM

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: update column based on max date for each employee

    Personally, this looks like, to me, that you have a many to many relationship in your table structure, These aren't ideal. Do you have access to change your database design?...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: How to get top and bottom rows from where condition

    Use BETWEEN:
    WHERE Id BETWEEN 1 AND 5;

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: Formatting in HTML table

    sqlenthu 89358 - Wednesday, July 19, 2017 2:29 AM

    Here is the query which I am currently using:

    Select

    case when RevAmtMax <0...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: Formatting in HTML table

    sqlenthu 89358 - Wednesday, July 19, 2017 1:42 AM

    Thom A - Tuesday, July 18, 2017 5:31 AM

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: HTML ISSUE

    Microsoft docs also covers how to do this as well, on sp_send_dbmail (Transact-SQL). Have a look for Example C; "Sending an HTML e-mail message".

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: Covnert float and update date

    Looks like you're trying to update the existing (float) column with a date, which won't work. you'll need a new column, and then (if you want) you can drop the...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

Viewing 15 posts - 3,481 through 3,495 (of 5,109 total)