Coming Soon: GET:IT Endpoint Management 1-Day Conference on September 28th at 9:30 AM ET Coming Soon: GET:IT Endpoint Management 1-Day Conference on September 28th at 9:30 AM ET

Combine SQL results which have same value

Home Forums Other Microsoft Servers and SaaS SQL Server 2005 / 2008 / 2008 R2 / 2012 / 2016 Combine SQL results which have same value

Viewing 1 post (of 1 total)
  • Author
    Posts

  • 5habbaranks
    Member
    #166948

    Hi,
    I’m trying to create a query to query year values, which works. The only problem is I only want to return or combine all similar year values as one rather than related to their actual records. For example multiple records contain the year 2014 so I want the result only to show one value of 2014.

    If I group and order by I still get multiple 2014 values in the results

    SELECT substring(Path,12,4)

    FROM [DB].[dbo].[Projects]

    Where [Path] like ‘XXX%’

    AND [Deleted] = ‘0’

    Group By Path

    Order by Path

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

Live Webinar: Active Directory Security: What Needs Immediate Priority!Live on Tuesday, October 12th at 1 PM ET

Attacks on Active Directory are at an all-time high. Companies that are not taking heed are being punished, both monetarily and with loss of production.

In this webinar, you will learn:

  • How to prioritize vulnerability management
  • What attackers are leveraging to breach organizations
  • Where Active Directory security needs immediate attention
  • Overall strategy to secure your environment and keep it secured

Sponsored by: