January 6, 2009 at 10:14 pm
I have 1000s number policy number list(this is not a table just a excel file that contains the policy number) that contains policynumber
and there is a table ABC contains all the available policy information based
on policy number, my requirement is that i need to findout
all those policy number that are not existing in the table ABC.
January 7, 2009 at 2:27 am
Well, reading excel data from within T-SQL requires many security related permissions such as enabling OPENROWSET configurations, read access to file etc..
So, my suggestion is to first import the excel data into a temporary table and then query that table for the required information, for. e.g.
SELECT*
FROMdbo.ExcelPolicies
WHEREPolicyNumber NOT IN( SELECT PolicyNumber FROM dbo.DBPolicies )
--Ramesh
January 7, 2009 at 9:53 am
You could also use SSIS to read the excel file and use a lookup component to compare to the policy numbers and output the missing numbers to a table or text file.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply