Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Am trying to fetch the data from 5 tables (Customer,geography,product,time,scenario) from SQL server.Where 2 tables (customer and geography) are joined by automatically. (Am getting that from table viewer)
But still am getting data from all the tables in my sheet and the Time is getting affected according to the customer selection as well, even though they does not have any relations. So am wondering is the data shown is correct?
Else how do i write some custom script to set the relation?
Please help me out.
Thanks in advance,
Mahasweta
Qlikview logical connects fields with the same name so you need to either rename fields that aren't the same or use the qualify-command.
Customer: Load nm ....
Region: Load nm as region_nm ...
If this is not your problem please supply a sample of your loading script.
/Michael
Mahasweta,
can you post the query you are using along with column names in your qlik doc?
-Raghu
Hi,
Thanks a ton for your reply.
Here i didnt write any script. Rather i have selected the fields from the sheet it self. so back end i got the script as below.
SQL SELECT * FROM AdventureWorksDW.dbo.DimScenario;;
//************************************************
LOAD TimeKey, FullDateAlternateKey, DayNumberOfWeek, EnglishDayNameOfWeek, SpanishDayNameOfWeek, FrenchDayNameOfWeek, DayNumberOfMonth, DayNumberOfYear, WeekNumberOfYear, EnglishMonthName, SpanishMonthName, FrenchMonthName, MonthNumberOfYear, CalendarQuarter, CalendarYear, CalendarSemester, FiscalQuarter, FiscalYear, FiscalSemester;
SQL SELECT * FROM AdventureWorksDW.dbo.DimTime;;
//************************************************
LOAD CustomerKey, GeographyKey, CustomerAlternateKey, Title, FirstName, MiddleName, LastName, NameStyle, BirthDate, MaritalStatus, Suffix, Gender, EmailAddress, YearlyIncome, TotalChildren, NumberChildrenAtHome, EnglishEducation, SpanishEducation, FrenchEducation, EnglishOccupation, SpanishOccupation, FrenchOccupation, HouseOwnerFlag, NumberCarsOwned, AddressLine1, AddressLine2, Phone, DateFirstPurchase, CommuteDistance;
SQL SELECT * FROM AdventureWorksDW.dbo.DimCustomer;;
//************************************************
LOAD GeographyKey, City, StateProvinceCode, StateProvinceName, CountryRegionCode, EnglishCountryRegionName, SpanishCountryRegionName, FrenchCountryRegionName, PostalCode, SalesTerritoryKey;
SQL SELECT * FROM AdventureWorksDW.dbo.DimGeography;;
//************************************************
LOAD GeographyKey, City, StateProvinceCode, StateProvinceName, CountryRegionCode, EnglishCountryRegionName, SpanishCountryRegionName, FrenchCountryRegionName, PostalCode, SalesTerritoryKey;
SQL SELECT * FROM AdventureWorksDW.dbo.DimGeography;
Now please do suggest me .
Thanks & Regards,
Mahasweta
If you can see the Last 3 LOAD statements the "GeographKey" is the common field. These 3 tables will be linked together. But i don't see any link with the first LOAD statement.
-Raghu
"i should not fetch the data from other tables where there is no link"
ANS: No, You can fetch data without having link between tables.
But if you want to join between tables you have to be careful to link the fields. Data won't be wrong, you are getting the right data.
-Raghu.
Thanks a ton Raghu...
So if am getting correct data then no need to worry for the links in the back end.
Regards,
Mahasweta