?
Solved

Maintain Strict Domain Integrity

Posted on 2010-11-30
2
Medium Priority
?
517 Views
Last Modified: 2012-05-10
I'm curious to see if anyone can suggest a good way to maintain good domain integrity on sql server that will stop or warn user's if they try to join incompatible fields with the same data types.
For example
Select ORDER_ID, CUSTOMER_ID
FROM ORDERS o
INNER JOIN CUSTOMERS c
ON o.ORDER_ID = c.Customer_ID

This query clearly doesn't make sense as orders are not customers but SQL server will allow it if the data types are the same. Hence is there a good way to warn or prevent users from doing such queries?
0
Comment
Question by:geoffcoles
  • 2
2 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 total points
ID: 34239108
no way to block such incorrect "joins" from sql server.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 34239118
of course, good training will help to avoid :)
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
In this article, we’ll look at how to deploy ProxySQL.
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question