I have got an upload button on my webportal through which the customers can upload a csv file. After uploading the .csv file the csv data will be displayed on datagrid view on the screen, After uploading, the customer is suppose to verify data by clicking on verify button which basically checks the uploaded data have got the right data in particular columns against the existing database.What I want to do is to verify particular column like (productid) against the dbo.existingcustomers*. If the respective productid is present in thedbo.existing customer then status(column in the dbo.exisitingcustomers) should be populated with "ok" If the productid is notpresent in the dbo.exisiting then the Status(column in the dbo.exisitingcustomers) should be populated with "Please Check Your productid". After checking each row of the uploaded .csv file the system should display the data with an extra column named Status which will show the above messages for each row.Any help will be highly appreciated.I can upload the csv file and insert the data into sql server but I am having problems with checking the existing productid. As I want to make sure that the customers enterthe right productid which is present on my sql server, If they upload the wrong one which does not exist on the live database, they should amend it in order to proceed to next step. At present the customers have all the respective productid, I just want to check it if by mistake they typed the wrong productid which will save a huge amount of time*dbo.existingcustomers = table(sql server I have got an upload button on my webportal through which the customers can upload a csv file. After uploading the .csv file, the csv data will be displayed on datagrid view on the screen, After uploading, the customer is suppose to verify data by clicking on verify button which basically checks the uploaded data have got the right data in particular columns against the existing database.
What I want to do is to verify particular column like (productid) against the dbo.existingcustomers*. If the respective productid is present in the dbo.existing customer then status(column in the dbo.exisitingcustomers) should be populated with "ok" If the productid is not present in the dbo.exisiting then the Status(column in the dbo.exisitingcustomers) should be populated with "Please Check Your productid". After checking each row of the uploaded .csv file the system should display the data with an extra column named Status which will show the above messages for each row.
Any help will be highly appreciated.
I can upload the csv file and insert the data into sql server but I am having problems with checking the existing productid. As I want to make sure that the customers enter the right productid which is present on my sql server, If they upload the wrong one which does not exist on the live database, they should amend it in order to proceed to next step . At present the customers have all the respective productid, I just want to check it if by mistake they typed the wrong productid which will save a huge amount of time.
If any one can help me to write a query which can sort out this issue.
*dbo.existingcustomers = table(sql server)