Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

How to check if value exists in sql table if not then add it from Excel file

$
0
0

Hi,

I have one excel file having one filed called Source(Excel file has 2 fields, one of them is Source). And I have one table in SQL server name Source.

So I have to check is if the Source(Field name) in excel file is already exist in that Source table(Fields name in this table is SourceName)? If not then add this Excel field value in this Table. And if yes then don't do anything.

Excel file will be like below,

tester_you@aol.comsource_two
tester_hey@aol.comsource_three
tester_test@aol.comsource_one
tester_abc@aol.comsource_two

Please let me know how to do this? Thanks for help. 


Vicky




Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>