Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2005
    Posts
    29

    Unanswered: last position of the specified expression in a character string

    Hi,
    could you help me. I'd like to get last position of the specified expression in a character string(a fast solution for DB)
    Thanks for youe help

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    could you give an example please? which specified expression? what character string?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    This will probably involve some creative use of the REVERSE function, but give us some more details, please.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    yeah, REVERSE, that's what i was gonna say, with actual sql
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Darn, I was going to suggest Reverse() and Patindex()
    George
    Home | Blog

  6. #6
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    yeah, with one invokation of DATALENGTH() as well
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •