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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Creating a new field by concatenating two field

CONNECT TO [Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=HDW;Data Source=dvdb7;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=WCORR896ZB9;Use Encryption for Data=False;Tag with column collation when possible=False]; SQL SELECT "ADMIT_ARRIVE_DATE" as Admit_Date, "DISCHARGE_DISPOSITION_DATE" as Disch_Date, FacilityId, "INSURANCE_ID", "PA_ACCOUNT_STATUS_ID" as STATUS, "PATIENT_ACCOUNT_NUMBER" as ACCT_NUM, "PATIENT_SERVICE_ID", "PATIENT_STATUS_ID", "TOTAL_ADJUSTMENTS" as AdjustmentTotal, "TOTAL_CHARGES" as Charges, "TOTAL_INTEREST", "TOTAL_PAYMENTS" as Receipts, "TOTAL_WRITEOFFS", "VISIT_ID" as VISIT, FAC_INS =concat(FacilityId,"INSURANCE_ID") FROM HDW.dbo."Aff_VISIT";

Above is my select statement to being field from my SQL server. I need to create a distinct field by combining the FacilityID and the Insurance_ID. I different facilities that use the same code for different insurance names. My final QV will analyze each distinct insurance plan's performance.

When I run this script, I get an syntax error.

How can correct this so the field is available?

Thanks

Glen

1 Solution

Accepted Solutions
pover
Partner - Master
Partner - Master

Glen,

Try concat(FacilityId,INSURANCE_ID) as FAC_INS or you can do in the QlikView Load. It would be something like this:

Load *, FacilityId & INSURANCE_ID as FAC_INS;
SQL Select ... ;

Regards, Karl

View solution in original post

2 Replies
pover
Partner - Master
Partner - Master

Glen,

Try concat(FacilityId,INSURANCE_ID) as FAC_INS or you can do in the QlikView Load. It would be something like this:

Load *, FacilityId & INSURANCE_ID as FAC_INS;
SQL Select ... ;

Regards, Karl

Not applicable
Author

Thanks Karl.

The load statement worked.

Glen