Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm new about QlikView, just working on it few days.
I'm trying to connect to a SQL Server 2008 database, and configuring a simple sheet to navigate through some data.
In the database I have some table, suppose :
Company with company_ID and company_name column
and
Branche with branch_ID, branch_name and branch_companyID
What I want is to put on the sheet two ListBox with company_name and branches_name and when I click on a company I want to automatically select all the related branches.
I have created the two Listbox but when I select the company no branches are selected...how can I set this relation ?
I thought QlikView shows the database relation diagram and reflect all the relationships but I suppose it works in other way.
Thanks for your help.
Bye
you need to name your join keys identically, to create a link. In your case, rename branch_companyID to company_ID (case-sensitive!) and you'll se ethe data linked. Something like this:
SQL SELECT
branch_ID,
branch_name,
branch_companyID as company_ID
from branches;
good luck!
Oleg
Sorry I can't understand.
This is a part of the database DDL of the tables "Company" and "Branches"
Company table
CREATE TABLE [dbo].[tblCompany](
[company_guid] [uniqueidentifier] NOT NULL,
[company_name] [nvarchar](50) NOT NULL
)
Branches table
CREATE TABLE [dbo].[tblBranches](
[branch_guid] [uniqueidentifier] NOT NULL,
[branch_name] [nvarchar](3) NOT NULL,
[branch_company] [uniqueidentifier] NOT NULL
)
In SQL SERVER 2008 I make a JOIN with something like this :
Select * FROM tblCompany INNER JOIN tblBranches ON company_guid=branch_company
What I have to do to connect those two tables in QlikView ?
Thanks a lot
Ok,
I have understood now but is this (renaiming foreign key) the only way to connect data ?
There is no way to let QlikView import the "SQL Server Database Diagram" that stores all these information yet ?
thanks
Nope, this is the only way to do it. Since QlikView can bring data in from numerous sources into a single application, this is the only way to assure that all data sources can be connected based on the appropriate key structure.