Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

invalid column name

I keep getting an invalid column name as pic one shows.

If I \\ it tells me that that's a bad column field.

Any clues?

I copied the files from a working set but it keeps doing this.

LOAD *;
SQL SELECT FacID,
eRxMsgID,
    RxNo,
    DispenseDt,
    PatID,
    TransType,
    PharmID,
    PhrNPI,
    PhName,
    NDC,
    DrugLabelName,
    MOP,
    MOP2,
    PriceCd,
    TtlPrice,
    Payor1PaidAmt,
    Payor2PaidAmt,
    PatientPayAmt,
    Lables,
    NewRx,
    IVType,
    InvCost,
    EnteredByNPI,
    Entered,
    PackBy,
    Packed,
    CheckedBy,
    Checked,
    InitReview,
    PlacedInToteBy,
    PlacedInTote,
    TherapeuticInterchange,
    DelivID,
    DelivDate,
    LabelPrintedBy
//     LabelPrintedOn
   
FROM FwArchive.dbo.ECSHistory

Where FacId <> 'FORMS'
AND FacId <> 'MSTR'
AND FacId <> 'RETAIL'
AND FacId <> 'SAMPLE'
AND FacId <> 'TEST'
AND FacId <> 'TEST#2'
AND FacId <> 'TEST2'
AND FacId <> 'TEST3'
AND FacId <> 'TRLK'
AND FacId <> 'stag'
AND TransType <> 'Q''R'
AND Entered >= '2015-12-01 00:00:00';

1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

4 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

I can only assume that these fields used to be present in the table at the time of this script creation, however the fields are not there anymore.

Have you tried generating the same SQL statement again using the wizard? You should receive only the fields that are currently there...

cheers,

Oleg Troyansky

Upgrade your Qlik skills at the Masters Summit for Qlik - coming to Austin, TX in October!

Not applicable
Author

it always does it on the last one.  If I delete it it just goes up to the next one

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

what about generating the same SQL statement again?

Anonymous
Not applicable
Author

Replace AND TransType <> 'Q''R'  with 


AND not match ( TransaType,'Q','R')