SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Expressions


Expressions

Author
Message
mister.magoo
mister.magoo
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10661 Visits: 7891
Comments posted to this topic are about the item Expressions

MM


select geometry::STGeomFromWKB(0x0106000000020000000103000000010000000B0000001000000000000840000000000000003DD8CCCCCCCCCC0840000000000000003DD8CCCCCCCCCC08408014AE47E17AFC3F040000000000104000CDCCCCCCCCEC3F9C999999999913408014AE47E17AFC3F9C99999999991340000000000000003D0000000000001440000000000000003D000000000000144000000000000000400400000000001040000000000000F03F100000000000084000000000000000401000000000000840000000000000003D0103000000010000000B000000000000000000143D000000000000003D009E99999999B93F000000000000003D009E99999999B93F8014AE47E17AFC3F400000000000F03F00CDCCCCCCCCEC3FA06666666666FE3F8014AE47E17AFC3FA06666666666FE3F000000000000003D1800000000000040000000000000003D18000000000000400000000000000040400000000000F03F000000000000F03F000000000000143D0000000000000040000000000000143D000000000000003D, 0);




  • Forum Etiquette: How to post Reporting Services problems
  • Forum Etiquette: How to post data/code on a forum to get the best help - by Jeff Moden
  • How to Post Performance Problems - by Gail Shaw

  • james.of.rivendell
    james.of.rivendell
    SSC-Enthusiastic
    SSC-Enthusiastic (158 reputation)SSC-Enthusiastic (158 reputation)SSC-Enthusiastic (158 reputation)SSC-Enthusiastic (158 reputation)SSC-Enthusiastic (158 reputation)SSC-Enthusiastic (158 reputation)SSC-Enthusiastic (158 reputation)SSC-Enthusiastic (158 reputation)

    Group: General Forum Members
    Points: 158 Visits: 126
    Moral of today's question. Be careful when using indeterministic functions inside nullif...
    Danny Ocean
    Danny Ocean
    SSCrazy
    SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

    Group: General Forum Members
    Points: 2226 Visits: 1549
    Whistling i have taken more time to answer this and learn something new.

    Thanks MM

    Thanks
    Vinay Kumar
    -----------------------------------------------------------------
    Keep Learning - Keep Growing !!!
    www.GrowWithSql.com
    Koen Verbeeck
    Koen Verbeeck
    SSC Guru
    SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)

    Group: General Forum Members
    Points: 62864 Visits: 13298
    Very nice question. Thanks.


    How to post forum questions.
    Need an answer? No, you need a question.
    What’s the deal with Excel & SSIS?
    My blog at SQLKover.

    MCSE Business Intelligence - Microsoft Data Platform MVP
    hakan.winther
    hakan.winther
    Hall of Fame
    Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)

    Group: General Forum Members
    Points: 3319 Visits: 612
    Nice "tricky" question! Thank you!

    /Håkan Winther
    MCITPBigGrinatabase Developer 2008
    MCTS: SQL Server 2008, Implementation and Maintenance
    MCSE: Data Platform
    kapil_kk
    kapil_kk
    SSCertifiable
    SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)

    Group: General Forum Members
    Points: 5346 Visits: 2767
    Koen Verbeeck (8/7/2013)
    Very nice question. Thanks.

    +1 :-)

    _______________________________________________________________
    To get quick answer follow this link:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/
    mickyT
    mickyT
    SSCrazy
    SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

    Group: General Forum Members
    Points: 2852 Visits: 3318
    Nice question thanks
    ok181ko
    ok181ko
    SSC Rookie
    SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)

    Group: General Forum Members
    Points: 25 Visits: 65
    How about
    newid() = '00000000-0000-0000-0000-000000000000'

    The question is not correct. Answer is 0 (zero).
    Carlo Romagnano
    Carlo Romagnano
    SSCertifiable
    SSCertifiable (7.5K reputation)SSCertifiable (7.5K reputation)SSCertifiable (7.5K reputation)SSCertifiable (7.5K reputation)SSCertifiable (7.5K reputation)SSCertifiable (7.5K reputation)SSCertifiable (7.5K reputation)SSCertifiable (7.5K reputation)

    Group: General Forum Members
    Points: 7533 Visits: 3399
    Very good explanation!
    Here is why the first select may return 1,-1,negative and the second only 1 and negative.
    The same side effect of "C" macros:
    #define abs(a) (a < 0? a*-1: a )

    int a = 1;
    print("Result %d",abs(++a));

    Result 3


    select
    isnull(
    nullif( convert( varchar, sign( checksum( upper(newid()) ) ) ), '-1' )
    , 'negative'
    )
    declare @u uniqueidentifier = newid()
    select
    isnull(
    nullif( convert( varchar, sign( checksum( @u ) ) ), '-1' )
    , 'negative'
    )
    go 10



    I run on tuttopodismo
    paul.knibbs
    paul.knibbs
    SSCarpal Tunnel
    SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)

    Group: General Forum Members
    Points: 4230 Visits: 6240
    ok181ko (8/8/2013)
    How about
    newid() = '00000000-0000-0000-0000-000000000000'

    The question is not correct. Answer is 0 (zero).


    The question asked which of the answers were possible outputs of the statement. It never stated that *all* of the possible outputs were listed as answers. Plus, is it even possible for NEWID() to return a value that's all zeroes?
    Go


    Permissions

    You can't post new topics.
    You can't post topic replies.
    You can't post new polls.
    You can't post replies to polls.
    You can't edit your own topics.
    You can't delete your own topics.
    You can't edit other topics.
    You can't delete other topics.
    You can't edit your own posts.
    You can't edit other posts.
    You can't delete your own posts.
    You can't delete other posts.
    You can't post events.
    You can't edit your own events.
    You can't edit other events.
    You can't delete your own events.
    You can't delete other events.
    You can't send private messages.
    You can't send emails.
    You can read topics.
    You can't vote in polls.
    You can't upload attachments.
    You can download attachments.
    You can't post HTML code.
    You can't edit HTML code.
    You can't post IFCode.
    You can't post JavaScript.
    You can post emoticons.
    You can't post or upload images.

    Select a forum

































































































































































    SQLServerCentral


    Search