SQL Server Indonesia User Groups Community PT.% become %, PT - SQL Server Indonesia User Groups Community
Welcome to SQL Server User Group Indonesia
Sign in JoinHelp | Sign In Live ID

PT.% become %, PT

Last post 06-02-2009 12:03 PM by moats. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 05-29-2009 5:46 PM

    • moats
    • Top 10 Contributor
    • Joined on 04-06-2009
    • Posts 17

    PT.% become %, PT

    sob..sy ada trouble..hehehe..kyknya trouble terus nih... 

    client_code          company_name             address

    abc1                    PT.ace                      jln.D

    sel2                     PT.ask                      jln.A

    bagaimana merubah PT.ace dan PT.ask itu menjadi ace, PT dan ask, PT

    sy udah coba begini :


    select
    client_code,
    replace(company_name,'PT.%','%, PT') as company_name,
    address
    from coba

     

    tapi blm berhasil..any idea?? 

    thanks..

  • 06-01-2009 10:57 AM In reply to

    • moats
    • Top 10 Contributor
    • Joined on 04-06-2009
    • Posts 17

    Re: PT.% become %, PT

     kok sepi bgt yaa... biasanya ada MR.hendrix yg jawab...hehehe...

  • 06-01-2009 7:03 PM In reply to

    Re: PT.% become %, PT

    halo bos,

    sorry yah baru sempet buka sekarang.

    dah coba kayak gini:
    select
        client_code,
        replace(company_name,'PT.','') + ', PT' as company_name,
        address
    from coba

  • 06-02-2009 12:03 PM In reply to

    • moats
    • Top 10 Contributor
    • Joined on 04-06-2009
    • Posts 17

    Re: PT.% become %, PT

     hehehe..bro hendrix..udah clear trouble nya dari forum sebelah...

    thanx dah mau jawab...

    select
    client_code,
    substring(company_name,4,len(company_name))+', PT' as company_name,
    address
    from
    coba

     gt jawabannya..

     

Page 1 of 1 (4 items)
SQLServer-indo.org
Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright © 2008 SQL Server User Group Indonesia, All Rights Reserved