Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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;
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');
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');
Thanks so much Sunny worked a treat