Forum Discussion

Parikrisha's avatar
Parikrisha
Copper Contributor
Oct 06, 2026

SQL Data Discrepancy check

SQL issue - Power BI Excel/CSV files imported into SQL Tables and I need to do data discrepancy check - find logical discrepancy - find out dependency of fields and tables, Null, duplicates, Unwanted Fields, Junk elements, Logical Discrepancy, check tables  I have tables as below 1) ACTIVECUSTOMER, 2) Bank_Departure,3) CreditCard, 4) CUSTOMERINFO, 5) EXITCUSTOMER,6) GENDER, 7) GEOGRAPHY based on these tables how to check data discrepancy into SQL server, any inputs are much appreciated

1 Reply

  • MW_DEV's avatar
    MW_DEV
    Brass Contributor

    Before suggesting a specific solution, could you clarify what exactly you're trying to achieve?

    Are you looking for SQL queries or built-in SQL Server/SSMS features that can help you identify data quality issues such as NULL values, duplicates, invalid data, or missing relationships between tables? Or are you looking for something else?

    Also, do you want to perform these checks manually as a one-time data quality assessment, or are you planning to build an automated process that validates your data regularly, for example, after each Excel/CSV import?

    Depending on your goal, there are several possible approaches. You could simply inspect the tables in SSMS, write a few T-SQL queries using system catalog views, develop a more comprehensive data validation script, or even use a dedicated third-party data quality tool.

    Each approach has its advantages, so understanding what you want to accomplish would help to recommend the most appropriate solution rather than suggesting something unnecessarily complicated