Forum Replies Created

Viewing 15 posts - 6,031 through 6,045 (of 8,753 total)

  • RE: Trouble while upgrading from mssql 2008R2 to mssql 2012

    Quick question, are you running the upgrade as Administrator? Is the Administrator a member of SQL sa?

    😎

  • RE: Convert RGB color to HEX Color using SQL

    Further on the RGB to HEX conversion, it is simply working with 3 out of four octets in an integer, swapping octets 1 and 3, A12-B34-C56 becomes C56 B34-A12....

  • RE: Trouble while upgrading from mssql 2008R2 to mssql 2012

    From the top of my head, something along these lines: disable SSIS, detach the SSIS database and then run the upgrade. After the upgrade you can migrate your SSIS to...

  • RE: Convert RGB color to HEX Color using SQL

    Quick note on the sys.fn_varbintohexstr function, DON'T use it, use CONVERT instead. A little while back I was working with a large set of MD5 checksums and the original code...

  • RE: Convert RGB color to HEX Color using SQL

    Brilliant as always Jeff!

    Having had the first portion of my industrial strength espresso this morning it dawned on me that simple bit-bashing would do the job

    😎

    Reversing the byte order

    DECLARE @COLOURINT...

  • RE: Convert RGB color to HEX Color using SQL

    With the integer you will have to reverse the byte order, here is a quick example

    😎

    DECLARE @COLOURINT INT = 14745599;

    SELECT CHAR(35) + CONVERT(VARCHAR(6),SUBSTRING(CONVERT(BINARY(3),@COLOURINT,1),3,1) + SUBSTRING(CONVERT(BINARY(3),@COLOURINT,1),2,1) + SUBSTRING(CONVERT(BINARY(3),@COLOURINT,1),1,1),2)

    Result

    #FFFFE0

  • RE: Convert RGB color to HEX Color using SQL

    Hi Thomas,

    here is a quick example of RGB triplet string into a hex conversion

    😎

    DECLARE @STRCD VARCHAR(11) = '255,128,255';

    SELECT

    CONVERT(VARCHAR(11),CONVERT(BINARY(1),CONVERT(INT,SUBSTRING(@STRCD,1,CHARINDEX(',',@STRCD)-1),0),0)

    + CONVERT(BINARY(1),CONVERT(INT,SUBSTRING(@STRCD,CHARINDEX(',',@STRCD) + 1,CHARINDEX(',',@STRCD)-1),0),0)

    ...

  • RE: Count number of backup files are deleted from a default backup location

    Quick suggestion, run a DIR before and after, the difference in the counts are the number of files deleted

    😎

  • RE: Deadlock xdl file remains empty even during deadlocks

    Is it simply blocking or is it dead-locking?

    😎

    A comic situation would be two threads trying to write to the deadlock file at the same time...:-D

  • RE: Today's Random Word!

    SQLRNNR (3/13/2015)


    jasona.work (3/13/2015)


    Stuart Davies (3/13/2015)


    SQLRNNR (3/12/2015)


    drone

    Bee

    Happy

    shining people

    laughing

  • RE: Today's Random Word!

    eccentricDBA (3/13/2015)


    Ed Wagner (3/13/2015)


    crookj (3/13/2015)


    Revenant (3/13/2015)


    Ed Wagner (3/13/2015)


    djj (3/13/2015)


    crookj (3/13/2015)


    Ed Wagner (3/13/2015)


    djj (3/13/2015)


    Ed Wagner (3/13/2015)


    jasona.work (3/13/2015)


    Stuart Davies (3/13/2015)


    SQLRNNR (3/12/2015)


    drone

    Bee

    Happy

    Peaceful

    Flower Power

    1960s

    Hippy

    Dippy

    Dopey

    Grumpy

    Stinky (one of the 7 other dwarves by Craig Shaw Gardner)

    Limburger

    Cheesy

    Shark...

  • RE: The Worst Comments

    Digressing slightly, how would the threadizens describe the optimal code comments? Obviously the opposite of that would be the worst;-)

    😎

  • RE: Indexing and update stats script

    Don't take this bad but being blatant and straight to the point, given the lack of quality and the level of naivety portrait in the code posted, I strongly recommend...

  • RE: Why temp tables is faster then variable table?

    First a quick question, why the nolock hint? Are you running of a read only database? If the database is not read only then remove the nolock hints, re-run the...

  • RE: Why temp tables is faster then variable table?

    Can you post the full code, ddl and some sample data please?

    😎

Viewing 15 posts - 6,031 through 6,045 (of 8,753 total)