Guys is it possible to write a merge statement inside a select like below for correlated subqueries
my requirement is that i have pass to each date from top select statement
and for the each date select statement inside using clause
should check any data exists for that date and then do insert or update
select date from A a whe开发者_开发知识库re exists (
merge in to B b
using (
)
..
..
)
Surely you just want to use the SELECT inside the using clause?
merge into B b
using (
select ... where datecol = (select datecol from A a where ...)
)
..
..
)
精彩评论