• How about if you moved the email criteria to the outer select and added a DISTINCT?

    insert into userprofile(userID, fieldID, value,)

    select distinct userID, 1000, 'external'

    from user

    where not exists (

    select userID

    from userprofile

    where userid = user.userid

    and fieldID = '1000')

    and (user.email LIKE '%@hotmail%' or

    user.email LIKE '%@gmail%' or

    user.email LIKE '%@googlemail%' or

    user.email LIKE '%@yahoo%')

    _____________________________________________________________________
    - Nate

    @nate_hughes