Re: [sqlite] REQ: How do I change one character in a field value for another

2008-04-29 Thread Martin.Engelschalk
Hi,

look at the replace() - Function at 
http://www.sqlite.org/lang_expr.html#corefunctions
and use a statement like

update Aircraft set OperatorFlagCode  = replace(OperatorFlagCode, 
'~','-') where ... OperatorFlagCode like '%~%'

Martin
> Hi All,
>
> I need to change all occurances of a character in a field to another 
> character, as I dont use sqlite very often, I can select the records but 
> cannot work out how to code the "change character" part. Can anyone help?
>
> I need to cange all occurences of  "~" (tilde) to "-" (dash)
>
> the select statement is thus:
>
> select OperatorFlagCode from Aircraft where OperatorFlagCode like '%~%'
>
>
> thanks in anticipation
>
>
>   

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] REQ: How do I change one character in a field value for another

2008-04-29 Thread Graham Wickens
Hi All,

I need to change all occurances of a character in a field to another 
character, as I dont use sqlite very often, I can select the records but 
cannot work out how to code the "change character" part. Can anyone help?

I need to cange all occurences of  "~" (tilde) to "-" (dash)

the select statement is thus:

select OperatorFlagCode from Aircraft where OperatorFlagCode like '%~%'


thanks in anticipation


-- 
¿¿¿
   (ô ô)   [EMAIL PROTECTED]
ooO-(_)-Ooo   
Wot! No SBS?
IAT Boscombe Down Aircrew Transport 1989
RIAT Fairford Checklist Team 1990-2008
RAF Waddington Checklist Team 1995-2007
RNAS Yeovilton Checklist Team 2005,2007

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users