Forum Replies Created

Viewing 15 posts - 76 through 90 (of 130 total)

  • RE: How do I compare values in two columns based on a static date

    DinoRS - Wednesday, November 14, 2018 7:20 AM

    You can do this with EXCEPT, you want to know all the values from the...

    Retired Navy Chief Petty Officer, Consulting Systems Engineer, C# Programmer, SQL Beginner

  • RE: How do I compare values in two columns based on a static date

    I will also check out the script you posted.

    Retired Navy Chief Petty Officer, Consulting Systems Engineer, C# Programmer, SQL Beginner

  • RE: How do I compare values in two columns based on a static date

    Love what you posted. Should I use the following to compare against specific referenced records?;
    SELECT DISTINCT WEA, SSI1, SSI2, SSI3 FROM RT_Group_Coverage
    EXCEPT
    SELECT DISTINCT WEA, SSI1,...

    Retired Navy Chief Petty Officer, Consulting Systems Engineer, C# Programmer, SQL Beginner

  • RE: Getting an average UPDATED

    sgmunson - Friday, May 25, 2018 10:54 AM

    brian.cook - Friday, May 25, 2018 9:37 AM

    Retired Navy Chief Petty Officer, Consulting Systems Engineer, C# Programmer, SQL Beginner

  • RE: Getting an average UPDATED

    sestell1 - Friday, May 25, 2018 8:43 AM

    Hmm, you are grouping by the same columns you are averaging, so that probably isn't...

    Retired Navy Chief Petty Officer, Consulting Systems Engineer, C# Programmer, SQL Beginner

  • RE: Getting an average UPDATED

    I have refined it to this;
    SELECT
     WEA,
     Date_Time,
     AVG(SSI1),
     AVG(SSI2),
     AVG(SSI3)
    OVER
    (ORDER BY Date_Time ASC)
    FROM RT_Group_Coverage
    WHERE Date_time > DATEADD(hour, -24,  GETDATE()) AND SSI1...

    Retired Navy Chief Petty Officer, Consulting Systems Engineer, C# Programmer, SQL Beginner

  • RE: Getting an average UPDATED

    sestell1, based on the query you posted, I tried it this way, and do get results;

    SELECT
     WEA,
     Date_Time,
     AVG(SSI1),
     AVG(SSI2),
     AVG(SSI3)
     OVER
     (ORDER BY Date_Time...

    Retired Navy Chief Petty Officer, Consulting Systems Engineer, C# Programmer, SQL Beginner

  • RE: Getting an average UPDATED

    Thanks sestell1, Unfortunately it gives a syntax error on the usage of hour in the DateAdd portion. I have tried adding a single quote before and after the word hour....

    Retired Navy Chief Petty Officer, Consulting Systems Engineer, C# Programmer, SQL Beginner

  • RE: Getting an average UPDATED

    Luis, that is true, it may end up being that simple. The three SSI columns need to be averaged over the 24 hour period, for each WEA. Some days may...

    Retired Navy Chief Petty Officer, Consulting Systems Engineer, C# Programmer, SQL Beginner

  • RE: Getting an average UPDATED

    Luis, thank you and I will update the question shortly.

    sestell1, I am stuck on how to accomplish it. I have not done anything like this before.

    Retired Navy Chief Petty Officer, Consulting Systems Engineer, C# Programmer, SQL Beginner

  • RE: Visual Studio C# project. Export DataTable to Excel formatting of column

    Yes, but I am trying to avoid having to make the user change anything. This will eventually go to upper  management, so taking all the extra steps out is a...

    Retired Navy Chief Petty Officer, Consulting Systems Engineer, C# Programmer, SQL Beginner

  • RE: Visual Studio C# project. Export DataTable to Excel formatting of column

    I figured out part of the answer.

    In the Export function, I added the line range[2, 7].EntireColumn.NumberFormat="#.##%;. This now displays the calculated value as Percentage on export. I still...

    Retired Navy Chief Petty Officer, Consulting Systems Engineer, C# Programmer, SQL Beginner

  • RE: Comlplicated query help

    Sounds like a good idea. Hitting the reference up now.

    Thanks again.

    Retired Navy Chief Petty Officer, Consulting Systems Engineer, C# Programmer, SQL Beginner

  • RE: Comlplicated query help

    Thank you for the suggestion. Max is only three digits for it. If I start running into issues, I will add the value you suggest.

    Retired Navy Chief Petty Officer, Consulting Systems Engineer, C# Programmer, SQL Beginner

  • RE: Comlplicated query help

    I very much appreciate the help. This is what my final query ended as;

    USE [NMS_RT]

    GO

    /****** Object: StoredProcedure [dbo].[GrpStatus] Script Date: 09/03/2013 12:48:45 ******/

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER...

    Retired Navy Chief Petty Officer, Consulting Systems Engineer, C# Programmer, SQL Beginner

Viewing 15 posts - 76 through 90 (of 130 total)