Hello,
i hope that somebody can help me. I have a problem with ms sql query.
i have two tabels(wtmenSends and T1) in a database. i need pick up all email addresses from table wtmenSends but without those email addresses which are in table T1.
I have written this sql query to get these Emails, but i get nothing by this query. Can somebody tell me, where is the problem? Thanks.
select wtmenSends.Email
from
wtmenSendswhere
notexists(select
T1.*from
(SELECT
wtmenSends.Id, wtmenSends.Email, wtmenSends.IDMailing, wtmenSends.Title, wtmenSends.Firstname, wtmenSends.Lastname, wtmenSends.IDUser,wtmenSends
.IdStatus, wtmenSends.IsSent, wtmenSends.DateSent, wtmenSends.wtobjIDClass, wtmenSends.wtobjDateCreated,wtmenSends
.wtobjDateChanged, wtmenSends.wtobjUserCreated, wtmenSends.wtobjUserChangedFROM
wtmenRobinsonsINNERJOINwtmenSends
ON wtmenSends.EmailNOTLIKE'%'+ wtmenRobinsons.FilterAND wtmenRobinsons.IsDomain= 1)as T1innerjoinwtmenRobinsons
on wtmenRobinsons.Filter= T1.Email)Hello my friend,
To start with, use the following SQL, and then add your extra clauses to it that you wish: -
SELECT Email FROM wtmenSends WHERE Email NOT IN
(SELECT Email FROM T1)
Kind regards
Scotty
|||
Hi Scotty,
thank you. my problem has been resolved.
best regards
pinsha
No comments:
Post a Comment