edit the varchar in the columns

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rockys
    New Member
    • Oct 2011
    • 2

    edit the varchar in the columns

    Hi All,

    one of tables' column contains the names, for eg, as
    "Obama, Barack" [with double quotes].

    I was wondering if we can do something to make it appear as Barack Obama in the tables. I think we can do it with declaring a variable but just could not manage to find a solution.

    And yes as this table contains the mutiple transactions of the same person we also end up with having multiple rows of "Obama, Barack"....... a datawarehouse concept(fact tables)

    Please help and thanks in advance!
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    You can use the InStr() function to find the location of the comma and then use SubStr() to pull that part of the string out.

    Comment

    • rockys
      New Member
      • Oct 2011
      • 2

      #3
      Hi Rabbit..

      Thanks for reply.. dint get the time to do as u said.. will try and surely reply here..

      Thanks again! :)

      Comment

      Working...