Results 1 to 4 of 4

Thread: Help needed

  1. #1
    Join Date
    Oct 2012
    Posts
    25

    Unhappy Unanswered: Help needed

    Women Art Revolution (2010)
    "!Next?" (1994)
    "#1 Single" (2006)
    "#ByMySide" (2012)
    "#Follow" (2011)
    "#nitTWITS" (2011)
    "$#*! My Dad Says" (2010)
    "$1,000,000 Chance of a Lifetime" (1986)
    "$100 Makeover" (2010)
    "$100 Taxi Ride" (2001)
    "$100,000 Name That Tune" (1984)

    Above mentioned is the movie column in my table Genres

    I just want to take the year i.e, (YYYY) at the end of each field. I used the code below
    update [Genres] set Movie = SUBSTRING([Movie],0,FINDSTRING ([Movie],"(",1))-1

    And the folllowing error
    Msg 195, Level 15, State 10, Line 1
    'FINDSTRING' is not a recognized built-in function name.

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    I think you meant either charindex or patindex.

  3. #3
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    RIGHT([Movie], 6) would also work, if your data is consistent.
    If it's not practically useful, then it's practically useless.

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

  4. #4
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Also: are you sure that you want to overwrite the movie title with the date alone? I imagine it would be more appropriate to remove the date from the title and create a new column for the year to which you put that information. In this case your UPDATE syntax would need changing.
    George
    Home | Blog

Posting Permissions

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