Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Query Using Email

Author  Topic 

petek
Posting Yak Master

192 Posts

Posted - 2009-05-21 : 03:06:54
Hi All,

thanks for looking at this post.......

Is there a way to query SQL from a email.

Basically i want to send SQL a email and execute a procedure.

Kind Regards

Pete.

jholovacs
Posting Yak Master

163 Posts

Posted - 2009-05-21 : 10:22:16
You'll need to write a custom listener in the programming language of your choice.

Be advised, this is dangerous. Email is not secure (any router between you and the SQL server can read what you wrote) and unless you write something into your listener to only accept queries from you, anyone in the world can play with your data.



SELECT TOP 1
w.[name]
FROM
dbo.women w
INNER JOIN
dbo.inlaws i
ON
i.inlaw_id = w.parent_id
WHERE
i.net_worth > 10000000
AND
i.status IN ('dead', 'dying')
AND
w.husband_id IS NULL
ORDER BY
w.hotness_factor DESC
Go to Top of Page
   

- Advertisement -