Forum Replies Created

Viewing 15 posts - 1 through 15 (of 33 total)

  • RE: Find and Remove Duplicate Records SQL Server

    vopipari (2/1/2016)


    Wouldn't this be a simpler solution and be a bit less confusing?

    delete Customers

    where CustID in (

    ...

  • RE: Find and Remove Duplicate Records SQL Server

    andy_111 (2/1/2016)


    Adrian_1 (2/1/2016)


    The OP is intending that only 1 row will be deleted (because SET ROWCOUNT = 1) and therefore on the 2nd pass will not delete because there is...

  • RE: Find and Remove Duplicate Records SQL Server

    andy_111 (2/1/2016)


    Daniel Matthee (1/31/2016)


    I have not tested but just by looking at the code will it not delete both the records???

    There is nothing to indicate that you just want to...

  • RE: Find and Remove Duplicate Records SQL Server

    I have not tested but just by looking at the code will it not delete both the records???

    There is nothing to indicate that you just want to get rid of...

  • RE: Combine rows of data

    Hi

    No problem at all. That is why are here 🙂

    Kind Regards

    Daniel

  • RE: Combine rows of data

    Hi

    Of course you can. Change the last select * from CTE to select * Into <permanent table> from CTE

    Kind regards

  • RE: Pivot with a twist

    Hi

    So this was not so of a twist after all 🙂

    Here is the code that you needed. The only difference is in the where clause where you combine the 2...

  • RE: Joining a pair of Tables

    No Problem at all

  • RE: Joining a pair of Tables

    So trying to post this from my phone

    SELECT Distinct c.[Name]

    FROM [EPDM].[dbo].[Projects] a

    Join [EPDM].[dbo].[ProjectTree] b

    ON B.ProjectID=A.ProjectID

    join [EPDM].[dbo].[Projects] c

    On b.childprojectId=c.projectid

    Where a.name ='projects'

    and a.[Deleted] = 0

    Hope this is what you...

  • RE: Combine rows of data

    No prob at all. Hope this helped

  • RE: Combine rows of data

    o sorry for that, just add a ; before the with CTE clause or copy below

    create table #Info(

    EQPT varchar(20),

    Seq int,

    ActivityDate date,

    Type varchar(5)

    )

    insert into #Info

    select

    'Vehicle1' ,221, cast('2013-1-11'as date) ,'IN'

    union select

    'Vehicle1' ,223, cast('2013-1-15'as date) ,'OUT'union...

  • RE: Combine rows of data

    Hi

    So OFF course there are better ways of doing think but a quick fix/idea you can use the following.

    create table #Info(

    EQPT varchar(20),

    Seq int,

    ActivityDate date,

    Type varchar(5)

    )

    insert into #Info

    select

    'Vehicle1' ,221, cast('2013-1-11'as...

  • RE: Joining a pair of Tables

    If the above is not what you are looking for please provide some sample data.

  • RE: Joining a pair of Tables

    Hi

    Well If i understand you correctly.

    You want to filter (where clause) by Project.name.

    Just looking at you table i think firstly your joins are incorrect, just by looking at your...

  • RE: Get Domain

    Yes the email is validated.

    In a perfect world I just want the best and fastest way getting the domain info

Viewing 15 posts - 1 through 15 (of 33 total)