Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a where clause that I am trying not to include FacID in my extract but it is not working and gives me no error?
LOAD *;
SQL SELECT FacID,
PatID,
RxBatch,
DispenseDt,
RxNo,
NDC,
DrugLabelName,
MOP,
PriceCd,
InvoiceGrp,
IVType,
LastModifiedBy,
LastModifiedOn,
MOP2,
TtlPrice,
TransType,
DelivID,
DelivDate,
Entered,
PharmID
FROM Rx.dbo.Rxs
Where FacID <> 'FORMS''MSTR''SAMPLE''TEST''TEST#2''TEST2''TEST3''TRLK''stag';
Please try the following:
Where FacID <> 'FORMS'
and FacID <> 'MSTR'
and FacID <> 'SAMPLE'
and FacID <> 'TEST'
and FacID <> 'TEST#2'
and FacID <> 'TEST2'
and FacID <> 'TEST3'
and FacID <> 'TRLK'
and FacID <> 'stag'
Please try the following:
Where FacID <> 'FORMS'
and FacID <> 'MSTR'
and FacID <> 'SAMPLE'
and FacID <> 'TEST'
and FacID <> 'TEST#2'
and FacID <> 'TEST2'
and FacID <> 'TEST3'
and FacID <> 'TRLK'
and FacID <> 'stag'
I just don't understand why sometims it works and other times it don't But thank you!
I know this has been answered, but you can also use the below option:
Where Not Match(FactID, 'FORMS', 'MSTR', 'SAMPLE', 'TEST', 'TEST#2', 'TEST3', 'TRLK', 'stag');
Thanks
thank you will put that in my notes