If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > Drop Relationships

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-11-05, 07:45
santal_maluko santal_maluko is offline
Registered User
 
Join Date: Jan 2005
Posts: 23
Exclamation 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
Reply With Quote
  #2 (permalink)  
Old 01-11-05, 08:16
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
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
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 01-11-05, 11:05
santal_maluko santal_maluko is offline
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old 01-11-05, 12:01
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
then when you create the relationship, you should assign it a constraint name
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #5 (permalink)  
Old 01-11-05, 13:08
santal_maluko santal_maluko is offline
Registered User
 
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!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On