Reputation: 1914
I'm working on a C# application that imports data from Access into SQL Server. They select an Access file, then a table in the file.
I then perform checks on the data to see if it's valid to import. I want to display a list of columns from the table that have no data in them, so the user has to confirm they want to import regardless of certain empty columns.
Is there an approach to this in Access besides looping through SELECT ... WHERE (field) IS NULL
queries?
Upvotes: 3
Views: 432
Reputation: 97101
Is there an approach to this in Access besides looping through SELECT ... WHERE (field) IS NULL queries?
I don't know of an alternative to looping, but I will suggest a different strategy for the queries you run in the loop. Seems to me you would want to know whether any rows include non-Null values for the given field.
SELECT Count(*) AS row_count
FROM Table_Name
WHERE field_name Is Not Null;
Upvotes: 1
Reputation: 21086
No looping necessary
Upvotes: 0