Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have 10-11 tables and in each table i have columns .. also expression now also did rename expression with label like this
"Salary" now i want all column names in capitalize like SALARY so this is difficult for me to look on each table and capitalize each column so is this possible to capitalize column name globally ?
use the below script from the thread may be
https://community.qlik.com/t5/New-to-QlikView/convert-column-name-to-upper-case/td-p/882695
will you please post solution here.. and secondly i dont want to do in script .. is there alternate way
how can you capitalize the column names in UI and not in script?
Please modify the script. It is copied from the script in the post above mentioned
Directory;
FILE:
load * inline [
file, table
b.xlsx, B_TABLE
a.xlsx, A_TABLE
c.xlsx,C_TABLE
];
// loop and read excel files
for file=0 to NoOfRows('FILE')-1;
let filename=Peek('file', $(file), 'FILE');
let tablename=Peek('table', $(file), 'FILE');
$(tablename):
load * from $(filename)
(ooxml, embedded labels, table is Sheet1);
// loop on table fields to build the "rename as" for every field
let s = '';
for field=1 to NoOfFields('$(tablename)');
let s = '$(s)'
& if(len('$(s)')>0, ',' & chr(10), '')
& '[' & FieldName($(field), '$(tablename)') & ']'
& ' as ' & '[' & upper(FieldName($(field), '$(tablename)')) & '] ';
NEXT field;
// read table using the "rename as"
rename table $(tablename) to TMP;
$(tablename):
NoConcatenate load
$(s)
Resident TMP;
DROP Table TMP;
NEXT file;
so i have 3 + scripts so on every scripts i paste this ?
/ loop on table fields to build the "rename as" for every field
let s = '';
for field=1 to NoOfFields('$(tablename)');
let s = '$(s)'
& if(len('$(s)')>0, ',' & chr(10), '')
& '[' & FieldName($(field), '$(tablename)') & ']'
& ' as ' & '[' & upper(FieldName($(field), '$(tablename)')) & '] ';
NEXT field;
means i have a multiple scripts in qlikview so want to ask in each scripts i paste or this or
ok in the loop there is tablename so here i write my tablename or i just paste this with "tablename" text?
and this shows an error when i paste this
let s = '';
for field=1 to NoOfFields('$(tableabc)');
let s = '$(s)'
& if(len('$(s)')>0, ',' & chr(10), '')
& '[' & FieldName($(field), '$(tableabc)') & ']'
& ' as ' & '[' & upper(FieldName($(field), '$(tableabc)')) & '] ';
NEXT field;