[GENERAL] simple UPDATE statement...

2008-03-11 Thread Joshua
Hello, I have a quick questions... consider the following information: I have a table 'customers' which looks like the following: firstname | middlename ---|-- Johnathan C Mark S Joshua Susan T Jennifer Marcus D Mike

Re: [GENERAL] simple UPDATE statement...

2008-03-11 Thread Justin
you need to strip the string apart using either regex which is difficult to use or split_part() http://www.postgresql.org/docs/8.3/interactive/functions-string.html The update will look something like this... Update customer set custfirstname = split_part(Name, ' ', 1) , custmiddlename =