Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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

Tags (2)
1 Solution

Accepted Solutions
Luminary
Luminary

Creating a new field by concatenating two field

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

2 Replies
Luminary
Luminary

Creating a new field by concatenating two field

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

Creating a new field by concatenating two field

Thanks Karl.

The load statement worked.

Glen

Community Browser