ravikumar00008
New Member
Hi All,
I am having an excel workbook with some sheets.From that i am able to read the current month and previous month sheets data and inserting those columns data into sql table.
But to avoid insertion of same data all the time,
I just want to check a condition like if particular columns of sql table data and excel sheets data may match then i want to update those records in the database otherwise i want to insert as new records in to the database.
Some part i am successfully done(like insertion) but
i am not succeeded at select statement in the code(to check the rows count based on conditions for columns data match) and
at updating those records if condition met.
http://speedy.sh/v9xnB/SQLInsertandUpdateBasedOnCondition.xlsm
http://speedy.sh/nAzNr/DatabaseAndTableCreation.txt
Please look at the sample files along with database creation and please provide any solution to solve my problem
Thanks for any help.
Regards
Kumar
I am having an excel workbook with some sheets.From that i am able to read the current month and previous month sheets data and inserting those columns data into sql table.
But to avoid insertion of same data all the time,
I just want to check a condition like if particular columns of sql table data and excel sheets data may match then i want to update those records in the database otherwise i want to insert as new records in to the database.
Some part i am successfully done(like insertion) but
i am not succeeded at select statement in the code(to check the rows count based on conditions for columns data match) and
at updating those records if condition met.
http://speedy.sh/v9xnB/SQLInsertandUpdateBasedOnCondition.xlsm
http://speedy.sh/nAzNr/DatabaseAndTableCreation.txt
Please look at the sample files along with database creation and please provide any solution to solve my problem
Thanks for any help.
Regards
Kumar