Re: [SQL] Populate unique column with default value

2007-10-01 Thread Jon Horsman
> On 10/1/07, Jon Horsman <[EMAIL PROTECTED]> wrote: > > ... Is there an elegant way i can set the username > > to be the extension of the current row ... > > UPDATE usertable > SET username = extension > WHERE username IS NULL; Hmm, that simple eh, don't I feel stupid =) Thanks a ton for the qui

Re: [SQL] Populate unique column with default value

2007-10-01 Thread Rodrigo De Le�
On 10/1/07, Jon Horsman <[EMAIL PROTECTED]> wrote: > ... Is there an elegant way i can set the username > to be the extension of the current row ... UPDATE usertable SET username = extension WHERE username IS NULL; ---(end of broadcast)--- TIP 5: do

Re: [SQL] Populate unique column with default value

2007-10-01 Thread Jon Horsman
I guess what i'm looking for is something like the following, but i don't know how i'd do it. "UPDATE usertable SET username='SELECT extension FROM usertable WHERE id=' WHERE username ISNULL", Is this possible? Thanks, Jon. On 10/1/07, Jon Horsman <[EMAIL PROTECTED]> wrote: > Hey, > > I'm upda