Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Waiting for a response since long:
This question is Not Answered.(Mark as assumed answered)
deepikasakorey 07-Apr-2017 06:58
Hello Everyone,
I have a csv file which has some fields with missing values and I want to identify which all fields have missing values. I can also use as stored procedure to get the same content as of the excel file.
Can anyone suggest how I an achieve this using either CSV file or stored procedure.
I started with the following code using stored procedure.
OLEDB connection;
load *;
SQL ****** EXEC Stored procedure syntax*************;
But in the above syntax all null values disappear from the fields.
Thanks in advance.
Hi Stephan,
Thanks for the script .I tried it and it did give me what I wanted. But I also need to identify and display the rows of the fields with missing values.
Do you have any tip ?
for example:
Test1:
Student_name student_id age gender
A A1 15
B B1 F
C 20 M
So now from your formula I can identify which fields have missing values.
Here fields Student_id , age and gender have missing values.
Now I have rule_book which is as follows:
fieldname Should_have_missing_values
Student_name 1 ( cant have)
Student_id 1 (cant have)
age 0(may or may not have missing values)
gender 1(cant have missing values)
Now I have compare this rule book to the data(Test1) to identify which fields dont follow the rules and display rows where the rules arent followed.
for eg. student_id should not have null values. and the row is
C .... 20.... M etc
Can you help here?
Thanks,
Deepika