• Minnu (5/22/2015)


    Hi Team

    using below code to replace the city names, how to avoid hard coding of city names in below query and get from a table.

    select id, city,

    LTRIM(RTRIM(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(city,

    'JRK_Ikosium', 'Icosium'), 'JRK_Géryville', 'El_Bayadh'),'JRK_Cirta', 'Constantine'),'JRK_Rusicade', 'Philippeville'),

    'JRK_Saldae', 'Bougie')))

    New_city_name

    from towns

    Pleae try.

    Try what? For what reason?

    Instead of asking us to do something for no apparent reason, please state your question.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.