Forum Discussion
Direct Query SQL table fails to import even though it previews correctly
Can you post the SQL you are using?
One nit-pick, when you use Direct Query, you are technically not "importing" anything.
Hi,
I know it's not importing, but I don't know what other term to use and to my mind because I am merging 2 different tables then I feel like I am 'importing'. Anyway....
Here is the script
select Dept2.[MEM_DESC] as 'Parent Dept',Dept2.MEM_ID as 'Parent Id',Dept1.MEM_ID as 'Dept Id', Dept1.[MEM_DESC] as 'Child Dept' from [CLIVE].[CLIVE].[CUST1] Dept1 inner join [CLIVE].[CLIVE].[CUST1_TREE] DeptTree on Dept1.MEM_ID=DeptTree.MEM_ID inner join [CLIVE].[CLIVE].[CUST1] Dept2 on Dept2.MEM_ID=DeptTree.MEM_PID
- v-caliao-msft9 years agoMicrosoft Employee
Can you get expected result by using this query in SQL Server Management Studio?
See similar threads below:
Regards,
Charlie Liao
- MarkHoughton9 years agoRegular Visitor
Hi, yes, when i enter the query in SQL managament studio the tables are merged as I expect, it displays the same results as the BI preview.