What's wrong with my query? system.outofmemoryexception

I have not had any success making any graphical joins as I am getting system.outofmemoryexception

Here's an example of one of my Join SQL's:

("IM_ItemCost"
INNER JOIN "IM_ItemWarehouse"
ON "IM_ItemCost"."WarehouseCode" = "IM_ItemWarehouse"."WarehouseCode")

Expressions that I've selected are QuantityOnHand, ExtendedCost, TransactionDate, LotSerialNo, WarehouseCode, ItemCode

I've been trying different variations and trying to join the tables in different ways and this is just one of the ways. Havent had any success running any of them yet. Am I doing it in an un-optimal way? Causing performance issues?