I am wondering if this is a known bug in SQL 2000 or is it a bug at all ??
use northwind
select * from Orders
where orderid in (select shipvia from [Order details])
The subquery field shipvia doesnt exist in the [Order Details] table but the full query still runs but returns no records.
I noticed this in a query I was running and for the particular tables that I was running this on, the complete query ran and just ignored the In operator clause and returned records.
It seems that as long as the field in the subquery exists in the initial query, it will run.
Bill, can I have some of you billions for spotting this or am i just being dense ?
Thanks
use northwind
select * from Orders
where orderid in (select shipvia from [Order details])
The subquery field shipvia doesnt exist in the [Order Details] table but the full query still runs but returns no records.
I noticed this in a query I was running and for the particular tables that I was running this on, the complete query ran and just ignored the In operator clause and returned records.
It seems that as long as the field in the subquery exists in the initial query, it will run.
Bill, can I have some of you billions for spotting this or am i just being dense ?
Thanks