PARSENAME

  • Thank you for the great question. Enjoyed an easy one.

  • Thank you for the great question. I learned something new today and I already can think of a few applications I can use it with. 🙂



    Everything is awesome!

  • Interesting question. I did run into this function once before when looking for a simple way to parse a short delimited string. Unfortunately my string had five elements. 🙁

  • Koen Verbeeck (10/25/2012)


    Great question about a function I didn't even know it existed 😀

    I knew it existed, but never had much use for it. A guy who I help with SQL problems on occasion was using it to split a manager heirarchy string I had built.

    Still personally don't have much use for it. And one day I'll get him to use Jeff's Delimited8k split function I have available instead, but at least I knew what this was.



    --Mark Tassin
    MCITP - SQL Server DBA
    Proud member of the Anti-RBAR alliance.
    For help with Performance click this link[/url]
    For tips on how to post your problems[/url]

  • Thanks for a nice question. BTW, reversal of the order is a frequent pitfall for people who are parsing IPs and do not read the doc carefully enough.

  • Interesting function. Not sure when I would use it but good to know anyways. Thanks for the question!

  • Seems like a nearly useless function, but at least I know about it now. It seems amazing to me that they can put this stuff in but leave out common functions like SPLIT, LPAD, and RPAD.

    Aigle de Guerre!

  • Revenant (10/25/2012)


    Thanks for a nice question. BTW, reversal of the order is a frequent pitfall for people who are parsing IPs and do not read the doc carefully enough.

    Yes, it is a nice question.

    Not realising that 1 delivers the LS portion (ie right hand end) is maybe something that intelites suffer from? The way I always, in the days when reading core dumps was a common passtime, had to remind my brain to work upside down when looking at an x86 core dump? I always found it hard to remember that hex 00FF meant not 255 but 65280, so of course I have no difficulty at all in understanding the order in this function!

    Tom

  • Thanks Ron.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Nice easy question. Thanks, Ron.

  • Definitely a good question.

    I regularly use PARSENAME to access the elements of a dot-seperated string. And yet, I still always have to check the documentation to recall which part each number refes to; I keep getting confused about counting from the left or the right, and counting from 1 or 0.


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/

  • Hugo Kornelis (10/27/2012)


    ... to access the elements of a dot-seperated string. ...

    ahhh..... now I am relieved...

    Thank you Hugo. 😎

    ww; Raghu
    --
    The first and the hardest SQL statement I have wrote- "select * from customers" - and I was happy and felt smart.

  • Thanks.

  • Awsome question! Learned something new and that always brightens my day!

    Kenneth FisherI was once offered a wizards hat but it got in the way of my dunce cap.--------------------------------------------------------------------------------For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/[/url]Link to my Blog Post --> www.SQLStudies.com[/url]

  • Good Function Related Question!

    Thanks

Viewing 15 posts - 16 through 30 (of 32 total)

You must be logged in to reply to this topic. Login to reply