I need to produce the column \"required\" in the following table using SQL without using loops and correlated sub queries. Is this possible in SQL 2008?
Date
I need to produce the column "required" in the following table using SQL without using loops and correlated sub queries. Is this possible in SQL 2008?
Impossible. Point. Not possibly on ANY SQL based server, including oracle.
The main problem here is that you rule out loops AND correlated subqueries and any way to retrieve the value at query time will ultimately use another query to find the valid value (actually one per field). This is how SQL works. Yes, you could hide them in a custom scalar function, but still they would contain a logical sub query.