ProvideX ODBC Issue

SUGGESTED

I am writing out a program and I keep getting this error on my sql statement

Error: Expected lexical element not found: <identifier> (State:37000, Native Code: 3F7)

Here below is my sql statement. I am nesting a select statement. 

SELECT ItemCode,BillNo,ComponentItemCode,QuantityPerBill,(SELECT CI_Item.TotalQuantityOnHand FROM { oj CI_Item INNER JOIN BM_BillDetail ON CI_Item.ItemCode = BM_BillDetail.ComponentItemCode } )
FROM { OJ CI_Item A
LEFT INNER JOIN BM_BillDetail B ON A.ItemCode = B.BillNo }
WHERE ((A.ItemType = '1')
AND (B.ItemType = '1')
AND (A.InactiveItem = 'N'))