Forum Replies Created

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

  • RE: Recursive CTE Duplication

    Mark,

    That looks to be very much what i need.  I am currently in the process of trying to understand the differences.

    Thank you so much for your...

  • RE: Recursive CTE Duplication

    To help illustrate my issue.....

    So here is an example data set:
    create table #TEMP 
    (ID varchar(10),
    Parent Varchar(10)
    )

    Insert into #TEMP
    values('1A',NULL),
    ('2A','1A'),
    ('3B','1A'),

  • RE: Recursive CTE Duplication

    Hi,

    Just to clarify.   For this odd example I want the nodes shown more than once.  So the top most node will show every node.  The second layer will...

  • RE: Recursive CTE Duplication

    Hi,
    Thanks for your reply.

    Sorry if i am not being clear.  I need to get all the descendants and not just the children.  So i need the children's...

  • RE: Trying to find the correct occurance!

    John Mitchell-245523 - Friday, March 10, 2017 8:47 AM

    Dan

    The splitter function will do that for you.  It takes a delimited list and...

  • RE: Trying to find the correct occurance!

    Hi Joe,

    Thanks for the message. I am trying it now.  Not sure if this is going to be too much (in terms of data - and performance).

  • RE: Moving values to fill in nulls.

    Thanks for everyones help.

    I worked out a quick way to do it.

    So effectively i numbered the columns 1-5 the opposite way round. Then in unpivoted the data making one...

  • RE: Moving values to fill in nulls.

    Luis Cazares (9/25/2015)


    danielfountain (9/25/2015)


    Luis Cazares (9/25/2015)


    I'm not sure if this is a good idea:

    However i do think this would work.... VERY slowly though. I keep feeling there is something...

  • RE: Moving values to fill in nulls.

    Luis Cazares (9/25/2015)


    I'm not sure if this is a good idea:

    WITH rCTE AS(

    SELECT s.saleid, u.userid, b.businessunitid, b.name, b.parentbusinessunitid, 1 AS n

    from...

  • RE: Moving values to fill in nulls.

    Sean Lange (9/25/2015)


    danielfountain (9/25/2015)


    Hi all,

    I have been away from SQL for a couple of months, and for the life of me cannot work out a simple way to do what...

  • RE: Lowest of a few dates

    Cadavre,

    Thats the ticket. I must say i have never used cross apply and i might need to do some research. I dont understand how that part works...

  • RE: Lowest of a few dates

    BWFC (1/9/2015)


    Depending on what you're trying to to select MIN(datecolumn) will do it.

    Sorry i dont think i have explained myself well.

    There are 5 separate columns all with dates in...

  • RE: Synonym

    Thank you for the question.

    I always find the questions that i straight away feel i know the answer a little disconcerting. I always feel i have missed something 🙂

  • RE: Apology for today's article

    Koen Verbeeck (6/23/2014)


    Maybe the editorial process could include something like "copy paste a sentence into google and see if something turns up".

    It will not catch everything, but at least the...

  • RE: No Files For You

    Koen Verbeeck (6/18/2014)


    BWFC (6/18/2014)


    Koen Verbeeck (6/18/2014)


    BWFC (6/18/2014)


    You are working for a company that has uses SQL 2012 for their on site databases.

    This explicitly rules out that the databases are...

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