SELECT Receive_Note.Receive_Note_ID AS Note_ID, ; Receive_Note.Receive_Note_Date As Note_Date, ; Suppliers.Supplier_Name As Factory_Name, Receive_Note.PO_No, ; Receive_Item.Product_ID, Products.Product_Name, ; Receive_Item.Quantity, Receive_Item.Price, Receive_Item.Amount, ; Receive_Note.Total_Amount, 000000 AS Total_Page, ; Users.User_Name As Response_Person ; From Receive_Note, Receive_item, Products, Suppliers, System!Users; WHERE Receive_Note.Receive_Note_ID == Receive_Item.Receive_Note_ID) ; AND Receive_Item.Product_ID == Products.Product_ID) ; AND Receive_Note.Supplier_ID == suppliers.Supplier_ID) ; AND Users.User_ID == Receive_Note.Receive_Person) ; AND Receive_Note.Receive_Note_ID = lsNote_ID); Into CURSOR myCursorTo make your query easier to read you may consider rewriting it using JOIN clause.