如何在 SQL Server 查询中使用 #TempTable 来获取报表生成器表适配器?
Select * From #Tmp1 t1 Left Join #Tmp2 t2
On t1.RouteID = t2.RouteID Join chr.dbo.Employee 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
这是我的示例临时表
如何为报表生成器创建 TableAdapter?
当我创建 TableAdapter 时,向导结果如下所示......
生成的 SQL 语句。
无效的对象名称“#Tmp1”
如何解决此问题?
Select * From #Tmp1 t1 Left Join #Tmp2 t2
On t1.RouteID = t2.RouteID Join chr.dbo.Employee 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以检查以下链接,tableadapter似乎无法与临时表一起使用,也许您可以使用支持真实表或使用子查询重建临时表
http://connect.microsoft.com/VisualStudio/feedback/details/111638/tableadapters-fails-when-storedproc-uses-temp-table
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