Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

gandalfgray
Valued Contributor

Rename column names that has square brackets in name

Hi

I have a select (MDX)  that returns column names like [Period].[Month].[MEMBER_CAPTION].

I would like to simplify those kind of names

but

Load [Period].[Month].[MEMBER_CAPTION] As Month

does not work

and

Load [[Period].[Month].[MEMBER_CAPTION]] As Month

does not work.

Is there a way to rename column names containing square brackets?

1 Solution

Accepted Solutions

Re: Rename column names that has square brackets in name

Use one of the other quote options. For example double quotes:

Load "[Period].[Month].[MEMBER_CAPTION]" As Month.


See this blog post for more information: QlikView Quoteology


talk is cheap, supply exceeds demand
3 Replies
MVP
MVP

Re: Rename column names that has square brackets in name

You may want to try like:

rename field (using mapname | oldname to newname{ , oldname to newname })

Or,

Rename field [ABC] to ABC

Re: Rename column names that has square brackets in name

Use one of the other quote options. For example double quotes:

Load "[Period].[Month].[MEMBER_CAPTION]" As Month.


See this blog post for more information: QlikView Quoteology


talk is cheap, supply exceeds demand
gandalfgray
Valued Contributor

Re: Rename column names that has square brackets in name

Thought I tried that...

Thanks!

Community Browser