Results 1 to 2 of 2

Thread: Comparing

  1. #1
    Join Date
    Oct 2003

    Red face Unanswered: Comparing

    Seeing as I am not the best with SQL and I was having a big time trouble with this I thought I would come here for some help. I have two tables with names in both two columns and want to update one table with the names of any new names in the other table. I have tried the following code and many versions of such.

    Please help. and yes this is not the best SQL code and thats why I came here.

    Insert Into 2003(Name)SELECT User_Name FROM Qry WHERE (Name FROM 2003)<>(User_Name From Qry)

    Also used the same code cept for UPDATE where Insert Into, and also changed Where statement to a couple other things.

    Thank you for your time.


  2. #2
    Join Date
    Oct 2003

    ...try something like this

    insert into [2003] (name)

    select q.user_name
    from qry q, [2003] t
    where <> q.user_name


    update t
    set = q.username
    from [2003] t, qry q
    where <> q.user_name

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts