I'm not sure if this is allowed but I wanted to clarify something. I have a lookup table field. For the sake of an example, let's call it AccountId. I want the specific name from a specific AccountId. Normally, I would do it like this:
List<Asset> AssetList = [SELECT AccountID From Asset]; List<Account> AccountList = [Select Name FROM Account where ID IN: AssetList];
My question is basically can I avoid doing two Select Statements in order to get the Name from a specific ID? If I have the AccountId already, is there any way of getting just the Name from that ID without doing a select statement?