Forum Replies Created

Viewing 15 posts - 4,441 through 4,455 (of 8,731 total)

  • RE: Are the posted questions getting worse?

    jasona.work (8/11/2015)


    Where are the balloons from the ceiling? Confetti?

    Cake?

    Is this the confetti you wanted?

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Are the posted questions getting worse?

    Am I late to the party? I was on a meeting.

    Should I open the bottles of champagne? Who's in charge of the BBQ? :hehe:

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Today's Random Word!

    Ed Wagner (8/11/2015)


    djj (8/11/2015)


    Eirikur Eiriksson (8/11/2015)


    Ed Wagner (8/11/2015)


    TomThomson (8/10/2015)


    SQLRNNR (8/10/2015)


    centrifuge

    acceleration

    Velocity

    Inertia

    Energy

    Force

    Dark Side

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Can I display all the days in a range even with no data ?

    More like inline views or single use views. You could also think of them as rearranged subqueries.

    The engine will process all of this as a single statement, so you want...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Can I display all the days in a range even with no data ?

    The easiest way is to understand what each CTE is doing. Just go step by step.

    The first one is your original query. The second one is a list of clients....

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: max not giving the latest one

    lcarrethers (8/10/2015)


    So all that I want to see is the max one for each kms_quoteorder

    How do you define the max one?

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Can I display all the days in a range even with no data ?

    I'm sorry, the ON clause shouldn't be there.

    When you changed the code to include this:

    FROM cteClients c

    CROSS JOIN dbo.dimDate d where c.DATESERV = d.DateFull

    You actually converted the CROSS JOIN...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Can I display all the days in a range even with no data ?

    sgmunson (8/10/2015)


    Luis Cazares (8/10/2015)


    sgmunson (8/10/2015)


    Given the rather small size of the likely range of values here, any suffered performance is likely to be irrelevant, and the recursive CTE is a...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Slow Query (FOR XML)

    I'm not sure how much can it be improved, but to give more advice you need to share more information as described in here: http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Are the posted questions getting worse?

    SQLRNNR (8/10/2015)


    Brandie Tarvin (8/10/2015)


    SQLRNNR (8/10/2015)


    Alvin Ramard (8/10/2015)


    Ed Wagner (8/10/2015)


    Lynn Pettis (8/10/2015)


    SQLRNNR (8/10/2015)


    48 bottles of post on the thread, 48 bottles of post.

    Take one down, pass it around, 48 bottles of...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Slow Query (FOR XML)

    As this should only be done for reporting, I'd suggest you to use only the rows needed instead of reading the 60 million rows. No one will ever need that...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: max not giving the latest one

    Considering the following options. Which one is right?

    CREATE TABLE #SampleData(

    createdon datetime,

    Kms_QuoteNumber varchar( 100))

    INSERT INTO #SampleData

    VALUES('2015-07-22 20:26:41.000', '15-35553/Rev9'),

    ...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Can I display all the days in a range even with no data ?

    sgmunson (8/10/2015)


    Given the rather small size of the likely range of values here, any suffered performance is likely to be irrelevant, and the recursive CTE is a lot easier to...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: max not giving the latest one

    What about using a different approach?

    This might be what you're looking for.

    SELECT TOP (1) kms_QuoteNumber

    FROM quote

    WHERE [kms_quotenumber] LIKE '15-35553%'

    ORDER BY createdon DESC

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Searching for allowed characters from table using function

    Something like this as they're table valued functions:

    SELECT UserName,

    Password,

    u.String AS CleanUserName,

    p.String AS CleanPassword

    FROM Customerstrings

    CROSS APPLY dbo.StripNonAllowedChars( UserName) u

    CROSS...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2

Viewing 15 posts - 4,441 through 4,455 (of 8,731 total)