What do you put in a subquery's Select part when it's preceded by Exists?
Select *
From some_table
Where Exists (Select 1
From some_other_table
Where some_condition )
I usually use 1, I used to put * but realized it could add some useless overhead.
What do you put? is there a more efficient wa...
Edited
Solution using or rather than union !
It seems there is a problem with linq2sql w.r.t selecting a relation post a UNION
msdn's social forums also indicate it as so
Intent
To get WCtegories & WPBands having items ("W") and each item with either a price or an offer specified
Sql just works fine but linq is bugging out with erro...
I am trying to query a database to find the following.
If a customer searches for a hotel in a city between dates A and B, find and return the hotels in which rooms are free between the two dates.
There will be more than one room in each room type (i.e. 5 Rooms in type A, 10 rooms in Type B, etc.) and we have to query the database to ...