sylwester.cz
New Member
- Joined
- Mar 5, 2009
- Messages
- 19
Dear All,
I am the beginner in SQL and PowerPivot and I hope you can help me.
I need to connect to MS Navision SQL database and import few tables with various columns selection in each of them. In table Import Wizard I have two options:
1) Select from a list of tables and views to choose the data to import
2) Write a query that will specify the data to import
I want to avoid option 1) as it takes a lot of time to manually find the tables and select needed columns.
I have written a SQL query but when I paste it to SQL Statement window only 1st table gets imported and the 2nd is omitted. I guess I need to change something in the SQL query but I do not know what. My goal is to upload for example 2 tables to separate 2 tabs in PowerPivot. Please advice how to fix this, thank you.
I am the beginner in SQL and PowerPivot and I hope you can help me.
I need to connect to MS Navision SQL database and import few tables with various columns selection in each of them. In table Import Wizard I have two options:
1) Select from a list of tables and views to choose the data to import
2) Write a query that will specify the data to import
I want to avoid option 1) as it takes a lot of time to manually find the tables and select needed columns.
I have written a SQL query but when I paste it to SQL Statement window only 1st table gets imported and the 2nd is omitted. I guess I need to change something in the SQL query but I do not know what. My goal is to upload for example 2 tables to separate 2 tabs in PowerPivot. Please advice how to fix this, thank you.
Code:
SELECT
[db].[company name prod$cust_ ledger entry].[entry no_],
[db].[company name prod$cust_ ledger entry].[customer no_],
[db].[company name prod$cust_ ledger entry].[posting date],
[db].[company name prod$cust_ ledger entry].[document type],
[db].[company name prod$cust_ ledger entry].[document no_],
[db].[company name prod$cust_ ledger entry].[description],
[db].[company name prod$cust_ ledger entry].[currency code],
[db].[company name prod$cust_ ledger entry].[sales (lcy)],
[db].[company name prod$cust_ ledger entry].[profit (lcy)],
[db].[company name prod$cust_ ledger entry].[sell-to customer no_],
[db].[company name prod$cust_ ledger entry].[customer posting group],
[db].[company name prod$cust_ ledger entry].[global dimension 1 code],
[db].[company name prod$cust_ ledger entry].[global dimension 2 code],
[db].[company name prod$cust_ ledger entry].[user id],
[db].[company name prod$cust_ ledger entry].[source code],
[db].[company name prod$cust_ ledger entry].[due date],
[db].[company name prod$cust_ ledger entry].[closed by entry no_],
[db].[company name prod$cust_ ledger entry].[closed at date],
[db].[company name prod$cust_ ledger entry].[closed by amount],
[db].[company name prod$cust_ ledger entry].[bal_ account no_],
[db].[company name prod$cust_ ledger entry].[transaction no_],
[db].[company name prod$cust_ ledger entry].[document date],
[db].[company name prod$cust_ ledger entry].[reversed],
[db].[company name prod$cust_ ledger entry].[reversed by entry no_],
[db].[company name prod$cust_ ledger entry].[reversed entry no_],
[db].[company name prod$cust_ ledger entry].[dimension set id]
FROM [db].[company name prod$cust_ ledger entry]
SELECT
[db].[company name prod$g_l account].[no_],
[db].[company name prod$g_l account].[name],
[db].[company name prod$g_l account].[account type],
[db].[company name prod$g_l account].[global dimension 1 code],
[db].[company name prod$g_l account].[global dimension 2 code],
[db].[company name prod$g_l account].[gen_ posting type],
[db].[company name prod$g_l account].[gen_ bus_ posting group],
[db].[company name prod$g_l account].[gen_ prod_ posting group],
[db].[company name prod$g_l account].[cost type no_],
[db].[company name prod$g_l account].[sru-code]
FROM [db].[company name prod$g_l account]