Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
rcorcoran
Creator
Creator

excluding some data from load

Hi

I have a dashboard that is loading data from a database.  The script below works fine to load service provider data and also to create a composite key.  However I need to change it now to exclude where the SPType is A1, A2 and A3.  Could anyone tell me where/how I should do this?

Any help appreciated

Load
AUTONUMBER(SGType & SGKey & '_' & SPType & SPKey & '_' & 'CHO' & RDOKey, 'FC') as FullComposite,
SGType & SGKey & '_' & SPType & SPKey & '_' & 'CHO' & RDOKey as [SP Table FullComposite Code],
RDOKey as LookupRDO,
SGKey as LookupSGNum,
SGType as LookupSGType,
SGType & SGKey as SGComposite,
SPKey as LookupSPNum,
SPType as  LookupSPType,
SPType & SPKey as SPComposite;
// SGType & SGKey & '_' & SPType & SPKey & '_' & 'CHO' & RDOKey as FullComposite;
  
SQL SELECT
RDOKey,
SGKey,
SGType,
SPKey, 
SPType
FROM Healthstat_2015.dbo.ServiceProvider;

1 Solution

Accepted Solutions
sunny_talwar

May be this

Load
AUTONUMBER(SGType & SGKey & '_' & SPType & SPKey & '_' & 'CHO' & RDOKey, 'FC') as FullComposite,
SGType & SGKey & '_' & SPType & SPKey & '_' & 'CHO' & RDOKey as [SP Table FullComposite Code],
RDOKey as LookupRDO,
SGKey as LookupSGNum,
SGType as LookupSGType,
SGType & SGKey as SGComposite,
SPKey as LookupSPNum,
SPType as  LookupSPType,
SPType & SPKey as SPComposite;
// SGType & SGKey & '_' & SPType & SPKey & '_' & 'CHO' & RDOKey as FullComposite;
 
SQL SELECT
RDOKey,
SGKey,
SGType,
SPKey, 
SPType
FROM Healthstat_2015.dbo.ServiceProvider

WHERE SPType not in ('A1', 'A2', 'A3');

View solution in original post

2 Replies
sunny_talwar

May be this

Load
AUTONUMBER(SGType & SGKey & '_' & SPType & SPKey & '_' & 'CHO' & RDOKey, 'FC') as FullComposite,
SGType & SGKey & '_' & SPType & SPKey & '_' & 'CHO' & RDOKey as [SP Table FullComposite Code],
RDOKey as LookupRDO,
SGKey as LookupSGNum,
SGType as LookupSGType,
SGType & SGKey as SGComposite,
SPKey as LookupSPNum,
SPType as  LookupSPType,
SPType & SPKey as SPComposite;
// SGType & SGKey & '_' & SPType & SPKey & '_' & 'CHO' & RDOKey as FullComposite;
 
SQL SELECT
RDOKey,
SGKey,
SGType,
SPKey, 
SPType
FROM Healthstat_2015.dbo.ServiceProvider

WHERE SPType not in ('A1', 'A2', 'A3');

rcorcoran
Creator
Creator
Author

Thanks so much Sunny worked a treat