Toad World® Forums

Query Builder to create Update Query using correlated subquery

I’m aware that DB2 does not allow joins in update queries; it requires correlated subqueries. That makes writing update queries a bit more complex.

Is there any way to use Query Builder to write these update queries?

  1. You can’t add a subquery to an update query in Query Builder

  2. If I create my own subquery first, I don’t see a way in Query Builder of using the result of the subquery to update anything in the top level of the query.

Is this functionality not built into Query Builder? What kind of update queries can it model?

Thanks in advance

This might a tricky one for us to pull off.

Can you send or post an example of your correlated UPDATE subquery?



Sure-- give me a couple of days.

But if Toad Query Builder can’t currently create update queries for DB2, you might want to remove it as an option in the “type of query” drop down.

I spent a lot of time assuming I was doing something wrong.

Thanks for your interest in this, Jeff.