goofaholix
MIS
I came across some code recently constructed with lookup subqueries nested inside the select statement. I haven't seen this approach before and it strikes me as an odd way of doing it, is it common? is it efficient? Why would you choose this approach over joining the tables in the FROM statement?
Example;
Select
ID,
(select Location from tblLocation where ID=a.LocID) as Location,
(select AgeBracket from tblAgeBracket where ID=a.AgeID) as AgeBracket,
(select Status from tblStatus where ID=a.StatusID) as Status,
From tblMain as a
Thanks
Bruce
Bruce
<a href="
Example;
Select
ID,
(select Location from tblLocation where ID=a.LocID) as Location,
(select AgeBracket from tblAgeBracket where ID=a.AgeID) as AgeBracket,
(select Status from tblStatus where ID=a.StatusID) as Status,
From tblMain as a
Thanks
Bruce
Bruce
<a href="