Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
I have a confusion in resolving Circular Reference from my Application.
I want the most easiest way to resolve it.
I am giving an example of my Table structure:
Table1: Table2: Table3
Team, City Country
Country Team City
How will i remove circular reference from it. Since, All the columns are important in my application I cannot omit it
Regards,
Priyanka
Use this code to laod your Employees:
Employees:
LOAD EmployeeID,
LastName,
FirstName,
Title,
TitleOfCourtesy,
BirthDate,
HireDate,
Address,
City AS EmployeeCity,
Region,
PostalCode,
Country AS EmployeeCountry,
HomePhone,
Extension,
Photo,
Notes,
ReportsTo,
PhotoPath;
SQL SELECT *
FROM NORTHWND.dbo.Employees;
The reasoning is that it's probably not very useful to look at facts for which both the Employee (Sales Executive) and the Customer live in the same city.
Best,
Peter
You can rename the Country column in any one of the table.
this can help
Hi,
Decision on what to do with data depends not only on the data themselves but also on the goals of the application, so first you should understand whether all of the duplicates play the same role or not. E.g. in one app I have two regions - on is plan region and other is fact region of sales.
Say if your Contry fields play the same role it's more then reasonable to put in into one table, as well as other duplicates. Here we come to the idea of link table but again that depends on your requirements.
Best regards,
Maxim
Hi Priyanka018
You can rename the any one of the Country Columns or You can go for Loosely coupled tables concept.
Please look for loosely coupled tables concept.
Regards
Manideep
Hi,
Try using LOSSEN TABLE tablename for one of the tables.
Rename Country .
Hi,
Reaname the fields i.e using alias
or use Qualify and Unqulify keyword
Example
Table1:
LOAD * INLINE [
Team, Country
A, India
B, AUS
C, PAK
];
Table2:
LOAD * INLINE [
Team, City
A, bangalore
B, Sydeny
];
Table3:
Qualify *;
UNQUALIFY City;
LOAD * INLINE [
Country, City
India, banglore
AUS, Sydeny
];
UNQUALIFY;
Priyanka plz go throw this ling for understanding circular loop-
There are many ways of resolving the problem, but the real problem is that you need to understand your requirements and your data and decide what you need to do with the 'extra' Country field. Is it:
How you handle it is dependent on what it means and what your users will require. You cannot just load and pray.