开发者

Shape-like query in T-SQL

开发者 https://www.devze.com 2022-12-27 02:03 出处:网络
I would like to write a T-SQL statement, that structures data to be loaded into a Ado.Net DataSet like it was possible with the ADO SHAPE command. Is there something similar in T-SQL?

I would like to write a T-SQL statement, that structures data to be loaded into a Ado.Net DataSet like it was possible with the ADO SHAPE command. Is there something similar in T-SQL?

My idea is to select multiple rows from a main table and all related records from a child table. That data would get loaded in to a DataSet and then I would create relations and use GetChildRows().

The most straight forward solution would be to select records from the main table into a temp table and then use "select * from child_table where ParentID in (select Id from #temp)". But in more complex scenarios the code will become quite ugly.

Is there a better solution开发者_运维技巧 available?


The answer is quite simple: It's not possible at all! :-(

0

精彩评论

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

关注公众号