Hi, excuse my ignorance on the subject, i'm new to sql. I'm trying to
build a select statement by reading info from a text file which contains a
list of names. See below:
SELECT EMail
FROM Employees
WHERE Name = <-- this is where the loop would start to read the names
from the text file.
Help!
Thanks,
Message posted via http://www.webservertalk.comSee thread:
Open a text file in a stored procedure
http://tinyurl.com/65sdn
Bryce|||You may want to import that text file into a table using DTS, then read the
values that way
Select Email
from Employees
Inner Join NewTable
ON Employees.Name = NewTable.Name
Or
Select Email
from Employees
where Name in (SELECT DISTINCT Name from NewTable)
--
Simon Worth
"LS via webservertalk.com" <forum@.webservertalk.com> wrote in message
news:c4322cbb3d3a4109b041a08c6e1e1142@.SQ
webservertalk.com...
> Hi, excuse my ignorance on the subject, i'm new to sql. I'm trying to
> build a select statement by reading info from a text file which contains a
> list of names. See below:
> SELECT EMail
> FROM Employees
> WHERE Name = <-- this is where the loop would start to read the names
> from the text file.
> Help!
> Thanks,
> --
> Message posted via http://www.webservertalk.com|||Thanks ALL... This is what I was looking for!
Message posted via http://www.webservertalk.com
Friday, February 10, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment