lsDBF_Name=SUBSTR(SYS(2015),3) 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 ALLTRIM(Receive_Note.Receive_Note_ID)==ALLTRIM(Receive_Item.Receive_Note_ID) AND ALLTRIM(Receive_Item.Product_ID)==ALLTRIM(Products.Product_ID) AND ; ALLTRIM(Receive_Note.Supplier_ID)==ALLTRIM(suppliers.Supplier_ID) AND ALLTRIM(Users.User_ID)==ALLTRIM(Receive_Note.Receive_Person) AND ALLTRIM(Receive_Note.Receive_Note_ID)=ALLTRIM(lsNote_ID); Into DBF (lsDBF_Name)