Forum Replies Created

Viewing 15 posts - 3,736 through 3,750 (of 26,490 total)

  • RE: Are the posted questions getting worse?

    Luis Cazares (5/31/2016)


    Grant Fritchey (5/31/2016)


    Because SQL Fertilization needs to become something we all talk about. It's important. Don't you understand how SQL Fertilization works?

    I have to say a lot of...

  • RE: Questions

    Guess the OP didn't like the responses received.

  • RE: overlap query where to and from can be same ( of next and previous range)

    rajemessage 14195 (5/28/2016)


    pls answer

    We gave you several shots in the dark. If those answers don't work, how about telling us what was wrong and what it is you expected....

  • RE: do not set any locking\blocking

    Mad-Dog (5/27/2016)


    Lynn Pettis (5/27/2016)


    Mad-Dog (5/27/2016)


    GilaMonster (5/27/2016)


    You really wouldn't want no locks at all. Rows deleted while they're still being inserted, updates affecting some of the rows they should because the...

  • RE: do not set any locking\blocking

    Mad-Dog (5/27/2016)


    GilaMonster (5/27/2016)


    You really wouldn't want no locks at all. Rows deleted while they're still being inserted, updates affecting some of the rows they should because the rest are still...

  • RE: Simple subquery

    Lynn Pettis (5/26/2016)


    drew.allen (5/26/2016)


    Lynn Pettis (5/26/2016)


    This:

    SELECT [GL Description], SUM(Amount) AS [Prior YTD Amount], Year

    FROM dbo.vlv_PriorYrDetailExpenses

    GROUP BY [GL Description], Year

    HAVING (Year = @Year) AND (Month <= @Month)

    It's going to complain...

  • RE: Simple subquery

    drew.allen (5/26/2016)


    Lynn Pettis (5/26/2016)


    This:

    SELECT [GL Description], SUM(Amount) AS [Prior YTD Amount], Year

    FROM dbo.vlv_PriorYrDetailExpenses

    GROUP BY [GL Description], Year

    HAVING (Year = @Year) AND (Month <= @Month)

    It's going to complain about the...

  • RE: How do gradually trim a big table

    Eric M Russell (5/26/2016)


    peter.row (5/26/2016)


    Eric M Russell (5/23/2016)


    If you're deleting a total of 100 million rows, then deleting in batches of 10,000 would be too small, because there will be...

  • RE: folder name

    Perhaps this?

    with testdata as (

    select

    Directory

    from

    (values

    ('/dev/Mywork/deailsbyWork'),

    ('/dev/MyTeam/deailsbyTeam'),

    ('/dev/MySubgroup/deailsbySubgroup'))dt(Directory)

    )

    select

    Directory,

    substring(Directory,charindex('/',Directory,2) + 1,(charindex('/',Directory,charindex('/',Directory,2) + 1) - charindex('/',Directory,2)) - 1)

    from testdata;

  • RE: Inline Table Functions with IF or Case Statement

    ScottPletcher (5/26/2016)


    You can use derived tables within the query to provide computed values, you don't need variables.

    Also, here's a quick demo to show that you can query from different tables,...

  • RE: Inline Table Functions with IF or Case Statement

    Or

    create function dbo.SomeFunction(

    @parm1 int,

    @parm2 varchar(4)

    )

    returns table as

    return

    select col1, col2, col3 from dbo.tab1 where @parm2 = '007' and ....

    union all

    select col1, col2, col3...

  • RE: folder name

    sharonsql2013 (5/26/2016)


    As mentioned

    It could be /dev/Mywork/deailsbyWork

    or /dev/MyTeam/deailsbyTeam

    or /dev/MySubgroup/deailsbySubgroup

    Outcome

    Mywork

    MyTeam

    MySubgroup

    Based on the above, usually then mean always, correct?

  • RE: Simple subquery

    alex_martinez (5/26/2016)


    I created a query and want to do if it is possible a subquery with summary, below is my code. Is it possible. I have never done...

  • RE: Inline Table Functions with IF or Case Statement

    fergfamster (5/26/2016)


    Ok, well i cant give you all my code. If you wanted to create an Inline function and have separate queries returned based on an IF statement is the...

  • RE: Are the posted questions getting worse?

    Who has the crystal ball this time?

Viewing 15 posts - 3,736 through 3,750 (of 26,490 total)