Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

BCS, can I connect a result of SQL query to external database in SharePoint list?

$
0
0
Can I connect a result of SQL query to external database in SharePoint list?
 
As I understand - External Content types could map only one table for list, but I need to get some combined data fromfew tables, not single one. So I am trying to get result with "Content Source" in SPD, it allows queries as I understand.
 
By example I have external database with tables "CountryRegion" and "SomeTable", screenshots are below:





I make some logic in query and get result, by example

    SELECT *     FROM AdventureWorks2008.Person.CountryRegion R     INNER JOIN    AdventureWorks2008.dbo.SomeTable T     ON R.CountryRegionCode = T.CountryRegionCode 

I get this result:



 Now I created "Content Source" in  SharePoint Designer, it allowed me to make this select query:
 

 
 But how can I map this result to SharePoint list?

Independent SharePoint Developer, freelancer http://blog.sharepoint-develop.com/


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>