Subject Re: [firebird-support] update string
Author jft
--- In firebird-support@yahoogroups.com, mugi yanto
<bantal_keyboard@...> wrote:
>
> Dear all,
>
> Would you please help me how to write the SQL syntax to modify my
table as shown below : ( I use FB 1.5)
>
> table_A
>
> klr date
> ------------------ ----------
> -0808-00001 06.08.2008
> -0808-00002 06.08.2008
> -0808-00003 07.08.2008
>
> i would like to change the rows of field klr like this
>
> klr date
> ----------------------- ----------------
> FK1-0808-20001 06.08.2008
> FK1-0808-20002 06.08.2008
> FK1-0808-20003 07.08.2008
>
Try:
update Table_A set
klr = 'FK1' || substring(klr starting from 1 for 6) || '2' || substring(klr starting from 8 for 4)

John