Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2005
    Posts
    23

    Exclamation Unanswered: Drop Relationships

    Hi there,

    I would Like to delete a relationship by SQL Syntax!

    When I go to M-Access I see the relationship with the name companiesVisitors
    and this is how it is represented...

    Companies(Company_ID) ------ Visitors(VisitorCompany)

    one-to-many

    How can I drop the relationship using SQL?

    Hope you can help me... I am searching a solution for days

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    you might need to know the name of the constraint

    see ACC2000: Create and Drop Tables and Relationships Using SQL DDL

    but if you're in the relationship window already, just click on the line joining the two boxes and delete it
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jan 2005
    Posts
    23
    That didn't help to much... I need the SQL to remove a relationship....

    I tried to delete the constraints, but that does not help me to much... because my Constraints have strange names such as "Rel_158FB2CC_919D_462B".... It's a totally random name given by Access

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    then when you create the relationship, you should assign it a constraint name
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Jan 2005
    Posts
    23
    but I can't do anything now, because is a software update.... it's to import data to new database formats... I can't guess wich names the constraint have.... it should be done in the beggining!

Posting Permissions

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