Select Statement Nested Query

六眼飞鱼酱① 提交于 2019-12-11 16:57:08

问题


I am using Zapier to add rows to SQL Server tables. However, I have needed to use the find row via custom query and create specific INSERT statements

However, Zapier will only work if there is select statement at the start of the query. The insert works but the flow fails as Zapier can only process one query / statement.

My query is

insert into Table_A (EntryID, FirstName)
output inserted.EntryID, inserted.FirstName into Table_B (EntryID, Firstname)
values (102, 'Fred')


select * 
from ILR_Test 
where EntryID = 102

Is there a way of making the insert activity part of a select statement through a subquery or some other way.

Thanks

来源:https://stackoverflow.com/questions/53352315/select-statement-nested-query

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!