Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2004
    Posts
    77

    Unhappy Unanswered: Delete only one record

    I have table name transactions.
    namecompany price expdate
    ab1 2 22/9/2004
    ab2 4 21/9/2004
    ab2 5 21/9/2004
    ab3 3 21/9/2004
    ab4 1 21/9/2004

    I want to delete the expdate of namecompany ab2 and price 4. So the result should be

    namecompany price expdate
    ab1 2 22/9/2004
    ab2 4
    ab2 5 21/9/2004
    ab3 3 21/9/2004
    ab4 1 21/9/2004

    How can I write Sql (I use Microsoft Access 2000)
    Last edited by gop373; 09-20-04 at 07:22.

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    update transactions
    set expdate = null
    where namecompany = 'ab2' and price = 4
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Aug 2004
    Posts
    77
    Oh... Thanks you very much. It work now.

Posting Permissions

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