SQL Server Reporting Service Question | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

SQL Server Reporting Service Question

Here’s my scenario. I have created two tables within a report. Let’s say TABLE 1 has 100 items FOR SALE. And let’s say that TABLE 2 lists 10 items that are SOLD.
What I’m trying to do is create a report that eliminates duplicates. In effect, I want to create a table with 90 items. I have joined the tables by item number, but evidently I’m using the wrong syntax (or tactic) to delete the dupes. Any thoughts, earthlings? Much thanks for any suggestions.
If understand your problem correctly…!! select * from Table1 t1
where not exists (select 1 from Table2 t2 where t1.itemnumber = t2.itemnumber) to delete from table1 delete t1
from table1 t1
join table2 t2 on t1.itemnumber = t2.itemnumber MohammedU.
Moderator
SQL-Server-Performance.com All postings are provided “AS IS” with no warranties for accuracy.

You need a query and not a report, you can embed same query within the reporting services report. Satya SKJ
Microsoft SQL Server MVP
Writer, Contributing Editor & Moderator
http://www.SQL-Server-Performance.Com
This posting is provided AS IS with no rights for the sake of knowledge sharing. The greatest discovery of my generation is that a human being can alter his life by altering his attitudes of mind.
]]>