Tables/Indexes
I am simply querying to return the available rows of an Account Number on one SQL table called ‘QA_Table’ which has 9 fields only as below.
Sample output Data
Acc_No Cust_No Prem_No Name Street Street2 State QA_Check Source_File
3467 20867 189754 John Main Green CA Yes Sheet_1
3467 20867 189754 John Main Green CA Yes Sheet_1
Expected output Data
Acc_No Cust_No Prem_No Name Street Street2 State QA_Check Source_File
3467 20867 189754 John Main Green CA Yes Sheet_1
Explain the Actual Issue
When I run the following code, 2 identical rows are returned for this account number 3467 as output above.
I only want one row returned for this account number 3467, as expected above. Only one row should return, as there is only one row for this Account in my QA_Table.
This is the Select query code I am running, where the 2 rows return:
SELECT Acc_No, Cust_No, Prem_No, Name, Street, Street2, State, QA_Check, Source_File
FROM QA_Table
WHERE Acc_No = 3467;
I even tried a Distinct around some fields in my query, but to no avail.
Any ideas?