Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm not sure what to make of this. I'm loading a sql string from an xml file and then doing a Qlikview replace on that sql. Here is the simplified xml:
<item>
<sql><![CDATA[select 'text' from table]]></sql>
<filename>filename.txt</filename>
</item>
Here's my test script:
XML:
LOAD trim(sql) as sql_string,
replace(filename, '.txt', '') as filename
FROM test.xml (XmlSimple, Table is [dbCallList/item]);
sql_string:
LOAD sql_string as sql resident XML where filename = 'filename';
let vSQL = peek('sql');
trace $(vSQL);
// replace nothing with nothing
let vSQL = replace('$(vSQL)', '', '');
trace $(vSQL);
The output before the replace is:
select 'text' from table
The output after the replace (which should do nothing):
select ''text'' from table
It adds two single quotes on either side of the string, which make it invalid SQL. Is this weird? Or am i missing something?
Thanks
Any thoughts on this? I submitted it just before the weekend maintenance so it might have gotten lost.