Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
byrnel0586
Creator
Creator

Primary Key

Hi,

I am trying to insert a primary key that I've already created into a new table, but I keep getting an error saying that the field is not found. For instance, I have a script that creates my QVDs that says this:

LOAD MEM_ID,
[Last Name],
[First Name],
[Date of Birth],
[Index Episode Start Date],
Gender,
[Readmission Date],
[Average Probability of readmission],
MEASURE_ID,
MEASURE_ID & Month(REPORT_DATE) & Year(REPORT_DATE) & DENOMINATOR & NUMERATOR & MEM_ID as _PCR2_KEY,
MEASURE_ID & Month(REPORT_DATE) & Year(REPORT_DATEas _PCR2Calc_KEY,
NUMERATOR,
DENOMINATOR,
REPORT_DATE

It is the _PCR2Calc_KEY field that I am having trouble with. When I go to load the script in my application, I get an error saying it can't find the field:

LOAD MEM_ID,
// [Last Name],
// [First Name],
   [Date of Birth],
// [Index Episode Start Date],
   Gender,
// [Readmission Date],
   [Average Probability of readmission],
MEASURE_ID,
NUMERATOR as NUMERATOR_PCR,
DENOMINATOR as DENOMINATOR_PCR
_PCR2_KEY,
_PCR2_CalcKEY,
Month as PCRmonth,
Year as PCRyear,
[Age at IESD]

I'm confused why there is no problem with the _PCR2_KEY field but there is an issue with the one after it. Does anyone see something I'm missing?

Thanks.

1 Solution

Accepted Solutions
sunny_talwar

I think the field that you created is this _PCR2Calc_KEY and the field you are calling in the next load statement is this -> _PCR2_CalcKEY

Do you see the misplacement of underscore

View solution in original post

4 Replies
swuehl
MVP
MVP

It depends on your input table file already containing the field or not.

sunny_talwar

I think the field that you created is this _PCR2Calc_KEY and the field you are calling in the next load statement is this -> _PCR2_CalcKEY

Do you see the misplacement of underscore

byrnel0586
Creator
Creator
Author

Oh my goodness I knew it had to be something like that, sometimes you just need a second pair of eyes! Thanks.

sunny_talwar

Yes you do