开发者

How to use #TempTable in SQL Server query for Report Builder Table Adapter?

Select * From #Tmp1 t1 Left Join #Tmp2 t2 
On t1.RouteID = t2.RouteID Join chr.dbo.Em开发者_如何学编程ployee ee
On t1.EmployeeID = ee.EmployeeID Join chr.dbo.Department d
On ee.DepartmentCode = d.DepartmentCode  
Order by t1.AreaGroup, t1.FrGroups, t2.AreaGroup, t2.ToGroups

This is my sample temp table

How do I create TableAdapter for Report Builder?

When I create TableAdapter, Wizard results came out like this...

Generated SQL Statement.

Invalid object name '#Tmp1'

How do I solve this problem?


you can check following links, tableadapter seems can not work together with the temp table, may be you can use support real table or rebuild your temp table with subquery

http://connect.microsoft.com/VisualStudio/feedback/details/111638/tableadapters-fails-when-storedproc-uses-temp-table

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜