Forum Replies Created

Viewing 15 posts - 3,961 through 3,975 (of 8,761 total)

  • RE: Time and Space: How to Monitor Drive Space in SQL Server

    Nice write-up Ed, good job!

    😎

    Just to mention, xp_fixeddrives is very handy for doing a quick check.

  • RE: Find Latest Date from Multiple Columns

    Jason A. Long (1/18/2016)


    Just for the fun of it... Here's a solution that uses a cast to binary & contaminate method...

    Test data...

    IF OBJECT_ID('tempdb..#temp', 'U') IS NOT NULL

    DROP TABLE #temp;

    CREATE...

  • RE: Find Latest Date from Multiple Columns

    Orlando Colamatteo (1/18/2016)


    @mister.magoo, never seen APPLY used with a row-ctor to unpivot like that. Very cool.

    Just for the sake of providing an alternative, we can do the same using a...

  • RE: Having fun with PARSENAME (SQL Spackle)

    Jeff Moden (1/18/2016)


    Ah... got it. Because of your references to Little Endian, I thought you were talking about converting 255.255.255.255 to 255255255255 as an Integer, which requires 5 bytes...

  • RE: Having fun with PARSENAME (SQL Spackle)

    Jeff Moden (1/18/2016)


    Eirikur Eiriksson (1/18/2016)


    Network endian-ness is predominantly big-endian and the method NetworkToHostOrder will swap the byte order to small-endian. This tells me that you are storing the IPs as...

  • RE: Having fun with PARSENAME (SQL Spackle)

    thierry.vandurme (1/18/2016)


    Sure, at the risk of getting shot because of bad coding 😉

    We have two helper functions converting from/to long/ip.

    We subscribe to the datagrid's CellFormatting event and change the...

  • RE: Flag Values Based on Columns

    nm.rajesh (1/17/2016)


    Thanks a lot 🙂

    You are very welcome.

    😎

  • RE: Having fun with PARSENAME (SQL Spackle)

    Must be getting tired, just realized that the XML shredding was heavily affecting the timing, adding a table for the ip ranges brings the matching of the 5 million down...

  • RE: Flag Values Based on Columns

    Quick suggestion

    😎

    USE tempdb;

    GO

    SET NOCOUNT ON;

    ;WITH SAMPLE_DATA(ID,code,DesiredFlag) AS

    (SELECT * FROM (VALUES

    (1,'999010',1)

    ,(2,'000010',1)

    ...

  • RE: Having fun with PARSENAME (SQL Spackle)

    Jeff Moden (1/17/2016)


    If you're sorting a BIGINT, I don't believe the sign bit will come into play at all for IP4 addresses.

    True but still one is sorting on [D][C][A] which...

  • RE: Having fun with PARSENAME (SQL Spackle)

    Jeff Moden (1/17/2016)


    Eirikur Eiriksson (1/17/2016)


    thierry.vandurme (1/15/2016)


    Nice article. May come in use one day so glad you shared that.

    Btw, I use bigint to store IP4 addresses (less space and able to...

  • RE: Having fun with PARSENAME (SQL Spackle)

    Jeff Moden (1/15/2016)


    thierry.vandurme (1/15/2016)


    Nice article. May come in use one day so glad you shared that.

    Btw, I use bigint to store IP4 addresses (less space and able to use ORDER...

  • RE: Having fun with PARSENAME (SQL Spackle)

    thierry.vandurme (1/15/2016)


    Nice article. May come in use one day so glad you shared that.

    Btw, I use bigint to store IP4 addresses (less space and able to use ORDER BY)

    Using a...

  • RE: Date Function

    Scott's fine code provides the correct answer but logic embedded in the code such as this is neither too readable nor maintainable and what is even worse is that it's...

  • RE: how to Select getdate () in yyyy/M format ?

    nigel. (1/15/2016)


    Orlando Colamatteo (1/13/2016)


    sushantkatte (1/13/2016)


    I want to select getdate() in the format yyyy/M. i tried to write a query as SELECT FORMAT(GETDATE(),'yyyy/M') but it is giving me error.I am a...

Viewing 15 posts - 3,961 through 3,975 (of 8,761 total)