Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

akuttler
New Contributor III

CONCAT ALPHA PRE-FIX STING IN DATA LOAD

Hello,

I am pulling simiar data form several different sources, I a field "patient id' which is not unique across the different sources and I would like to insert an alpha prefix to distinguish the data source:

So if my load scirpt is :

LOAD

    Date(Floor("Date of Service")) as "Date",

    PATIENTID as MRN,

    ItemCode AS CPT,

    Provider as RenderingPhysician,

    Quantity AS UNITS,

    PracticeName,

    CPT_CATEGORY

SQL SELECT *

FROM DataMart.dbo."DERM02Custom Charge Report"

WHERE PATIENTID is numerical.

Can I use concat or some other function to insert "DERM02" in front of each patientid?

Tags (1)
1 Reply
jaumecf23
Contributor III

Re: CONCAT ALPHA PRE-FIX STING IN DATA LOAD

Hi,

Try this:

LOAD

    Date(Floor("Date of Service")) as "Date",

    'DERM02' & PATIENTID as MRN,

    ItemCode AS CPT,

    Provider as RenderingPhysician,

    Quantity AS UNITS,

    PracticeName,

    CPT_CATEGORY

SQL SELECT *

FROM DataMart.dbo."DERM02Custom Charge Report"