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
 Development Tools
 Reporting Services Development
 SHOW ONLY CURRENT DATA WITHOUT DUPLICATES

Author  Topic 

tahseenm
Yak Posting Veteran

64 Posts

Posted - 2010-12-14 : 16:22:46
I CREATED A REPORT IN SSRS AND GOT EVERYTHING WHAT i AM LOOKING FOR. ONLY THING I NEED TO FILTER THE DATA TO SHOW CURRENT RECORD WITH NO DUPLICATES. CAN ANYBODY TELLS ME WHAT TO DO. HERE IS THE SCRIPT AND THE OUTPUT REPORT LOOKS LIKE.



SELECT BILLING.ACCOUNT.ACCOUNTNUMBER, BILLING.ACCOUNT.CUSTDESC, PROPERTY.ADDRESS.STNO, PROPERTY.ADDRESS.PREDIR,
PROPERTY.ADDRESS.STNAME, PROPERTY.ADDRESS.SUFFIX, PROPERTY.ADDRESS.CITY, PROPERTY.ADDRESS.STATE, PROPERTY.ADDRESS.ZIP,
ASSETMANAGEMENT_WATER.COMPWMTR.UNITID, ASSETMANAGEMENT_WATER.COMPWMTR.LOC,
ASSETMANAGEMENT_WATER.COMPWMTR.METERSZ, ASSETMANAGEMENT_WATER.COMPWMTR.UNITTYPE,
ASSETMANAGEMENT_WATER.METERREADING.READING, ASSETMANAGEMENT_WATER.METERREADING.HIGHREADING,
ASSETMANAGEMENT_WATER.METERREADING.READDTTM, PSO_WATER.WATERMETERDET.RADIONUMBER,
PSO_WATER.WATERMETERDET.RADIONUMBERHIGH, BILLING.ACCOUNT.ACCTCLASS
FROM BILLING.ACCOUNT INNER JOIN
PROPERTY.ADDRESS ON BILLING.ACCOUNT.ADDRKEY = PROPERTY.ADDRESS.ADDRKEY INNER JOIN
ASSETMANAGEMENT_WATER.COMPWMTR ON PROPERTY.ADDRESS.ADDRKEY = ASSETMANAGEMENT_WATER.COMPWMTR.ADDRKEY AND
PROPERTY.ADDRESS.ADDRKEY = ASSETMANAGEMENT_WATER.COMPWMTR.ADDRKEY INNER JOIN
ASSETMANAGEMENT_WATER.METERREADING ON
ASSETMANAGEMENT_WATER.COMPWMTR.COMPKEY = ASSETMANAGEMENT_WATER.METERREADING.COMPKEY AND
ASSETMANAGEMENT_WATER.COMPWMTR.COMPKEY = ASSETMANAGEMENT_WATER.METERREADING.COMPKEY AND
ASSETMANAGEMENT_WATER.COMPWMTR.COMPKEY = ASSETMANAGEMENT_WATER.METERREADING.COMPKEY INNER JOIN
PSO_WATER.WATERMETERDET ON ASSETMANAGEMENT_WATER.COMPWMTR.COMPKEY = PSO_WATER.WATERMETERDET.WATERMETERKEY AND
ASSETMANAGEMENT_WATER.COMPWMTR.COMPKEY = PSO_WATER.WATERMETERDET.WATERMETERKEY




moetahsen

rexyrexin
Starting Member

19 Posts

Posted - 2010-12-20 : 09:02:04
use distinct keyword after select.
Go to Top of Page
   

- Advertisement -