Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Add dynamic suffix to column names in load script

Hello,

I am trying to set up a multilingual environment (dutch - french). In my database I always have 2 columns for a caption or a name. One is suffixed with _NL, the other with _FR. Instead of selcting both columns I would like to select only one depending on a language variable.

LOAD "CAMPUS_ID",

    "CAMPUS_NR",,

    "CAMPUS_NAME_NL",

    "CAMPUS_NAME_FR";

SQL SELECT "CAMPUS_ID",

    "CAMPUS_NR",

    "CAMPUS_NAME_NL",

    "CAMPUS_NAME_FR"

FROM dbo."REF_CAMPUS_V";

Can someone help me out here? !

1 Reply
phaneendra_kunc
Partner - Specialist III
Partner - Specialist III

Let vLang = '_NL'; //Change this according to your need

LOAD "CAMPUS_ID",

    "CAMPUS_NR",

    "CAMPUS_NAME$(vLang)";

SQL SELECT "CAMPUS_ID",

    "CAMPUS_NR",

   "CAMPUS_NAME$(vLang)"

FROM dbo."REF_CAMPUS_V";