Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

Simple (I hope) script amendment

$
0
0

Hello

I am currently using SSRS 2008R2.

I am using this script:

SELECT

a.ID, a.EA1, b.EA2

FROM Database1Table1 AS a

WHERE a.ID LIKE N'Active;

Which is giving me the following output:

Row    ID          EA1                    EA2

1        1        wf@email.co        NULL

2        1         NULL                  wf2@email.co

3        1         NULL                   NULL

4        2         NULL                   NULL

5        3       wf3@email.co       NULL

etc.

ID = business number.

EA = email address.

In the above output, business ID 1 has three contacts, but only 2 have email addresses.

What I want to see are business IDs where we have no email contacts at all.

So for my output I do not want to see Business IDs 1 or 3, just business ID 2.

I am using this script:

SELECT

a.ID, a.EA1, b.EA2

FROM Database1Table1 AS a

WHERE a.ID LIKE N'Active;

I have tried adding:

AND (a.EA1 IS NULL) AND (a.EA2 IS NULL); but this of course still brings through ID 1, because one of our contacts there has no email address.

Can anyone please suggest an amendment to my script which would only bring through ID 2?

Many thanks


Viewing all articles
Browse latest Browse all 10045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>