Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
dirk1955
Creator
Creator

Error in field names when storing to QVD

Hi,

If have a number of fields in 1 particular table for witch the name of the field is not correctly saved in the qvd table.

Example:

I have in a load statement the following conditions:

......

If([Amount TOT.]<ApplyMap('MapAVG_Account_Period', ACJM,'No Data'),1,0) as [< AVG],

  If([Amount TOT.]>ApplyMap('MapAVG_Account_Period', ACJM,'No Data'),1,0) as [> AVG],

  If([Amount TOT.]<='1,5',1,0) as [>0 & <= 1,5],

  If([Amount TOT.]>'1,5' and [Amount TOT.]<='5',1,0) as [>1,50 & <= 5],

  If([Amount TOT.]>'5' and [Amount TOT.]<='10',1,0) as [>5 & <= 10],

  If([Amount TOT.]>'10' and [Amount TOT.]<='15',1,0) as [>10 & <= 15],

  If([Amount TOT.]>'15' and [Amount TOT.]<='20',1,0) as [>15 & <= 20],

  If([Amount TOT.]>'20' and [Amount TOT.]<='25',1,0) as [>20 & <= 25],

  If([Amount TOT.]>'25',1,0) as [>25]

After the store table to qvd command the field names become:

[&lt; AVG], instead of [< AVG]

[&gt; AVG], instead of [> AVG]

[&gt;0 &amp; &lt;= 1,5], instead of [>0 & <= 1,5]

[&gt;1,50 &amp; &lt;= 5], instead of [>1,50 & <= 5]

[&gt;5 &amp; &lt;= 10], instead of [>5 & <= 10]

[&gt;10 &amp; &lt;= 15], instead of [>10 & <= 15]

[&gt;15 &amp; &lt;= 20], instead of [>15 & <= 20]

[&gt;20 &amp; &lt;= 25], instead of [>20 & <= 25]

[&gt;25] instead of [>25]


Can this be solved because i need the field names as they are. (ex: [>0 & <= 1,5])


In the load script from the qvd file i use the names as they appear in the qvd file:

[&lt; AVG],

[&gt; AVG],

[&gt;0 &amp; &lt;= 1,5],

[&gt;1,50 &amp; &lt;= 5],

[&gt;5 &amp; &lt;= 10],

[&gt;10 &amp; &lt;= 15],

[&gt;15 &amp; &lt;= 20],

[&gt;20 &amp; &lt;= 25],

[&gt;25]

and then i get an error saying for example, "field not found <&lt;AVG> and so on.

Can this be solved and how?

I realy need the given names like [< AVG], for the field names to be as they are because those field names are used in other programs.

Can someone help me please?

1 Solution

Accepted Solutions
dirk1955
Creator
Creator
Author

Hi,

I have found the solution myself.

If i use the original names (ex: [< AVG]) in the load script from the qvd files instead of [&lt; AVG], everything works fine.

View solution in original post

5 Replies
Kushal_Chawda

Can you share the script file?

dirk1955
Creator
Creator
Author

Hi,

I have found the solution myself.

If i use the original names (ex: [< AVG]) in the load script from the qvd files instead of [&lt; AVG], everything works fine.

dirk1955
Creator
Creator
Author

It is ok, i have found the solution myself.

Thanks anyway.

Greetings

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Some additional info:

In a QVD, field names are stored in the XML header. If you use tag delimiters like '<' or '>' in your field names they will get translated into their HTML representations (the &gt; &amp; &lt; strings you may recognise from the occasional browser address bar) as to not break the XML format. QlikView will perform this translation both ways (both when STOREing and LOADing data from a QVD) so - as you already discovered yourself - these fields should keep their correct names at all times.

It's when you attempt to use the field names from the XML header for something else that you'll have to perform this same translation yourself.

dirk1955
Creator
Creator
Author

Thanks Peter, i assumed it was something like this.

Thank you for the extra info.