EchoAlertcom
IS-IT--Management
Hello,
Is it possible to use a text file in a JOIN with a table as I would between two tables?
For example if I have:
1. a text file c:\cust_phone.txt that contains 1 phone number per line.
2. a table that has a phone number column.
what we're using is something like this currently:
I import a specific list of phone numbers into dbo.suppression.Phone with a ListID that will show all these phone numbers as being apart of the same list.
My goal would be for me to not to have to import this list anymore into sql server. and have the users put the list in a directory on the server and use that in the query.
Thank you for the help.
Regards,
Steve
Is it possible to use a text file in a JOIN with a table as I would between two tables?
For example if I have:
1. a text file c:\cust_phone.txt that contains 1 phone number per line.
2. a table that has a phone number column.
what we're using is something like this currently:
I import a specific list of phone numbers into dbo.suppression.Phone with a ListID that will show all these phone numbers as being apart of the same list.
Code:
select *
From dbo.Customers
LEFT OUTER JOIN dbo.ExCustomers
ON dbo.Customers.Phone = dbo.Suppression.Phone
and dbo.Suppression.ListID = 5
WHERE dbo.suppression.Phone IS NULL
My goal would be for me to not to have to import this list anymore into sql server. and have the users put the list in a directory on the server and use that in the query.
Thank you for the help.
Regards,
Steve