Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I was under the assumption that regular SQL scripts could be used in the load scripts, but I'm struggling with getting this LOAD script to work.
It seems like when I add a SUBSTRING to the script e.g.
LOAD *;
SQL SELECT substring(Name,2,4)
from database ;
do I get an error saying
OLEDB read failed
SQL SELECT substring(Name,2,4)
from database
Why is that ?
/Frank
Try,
=mid(Name,Index(Name,'(',1)+1, Index(Name,'(',1)-Index(Name,'(',1)+4) as name
Include this condition in LOAD statement instead SQL SELECT
Hi,
it does work - only QlikView syntax is slightly different. It's SUBFIELD().
HTH
Thanks, in that case, how about SQL PATINDEX is it ant different syntax in qlikview ?
Don't know that one.
What does it do?
seaching for a pattern in a field e.g.
PATINDEX('(%',Name))
is searching for % in Name and returning the position
Try,
LOAD *,
mid(Name,2,4) as New_Name;
SQL SELECT *
from database ;
It's index() function in QlikView
Well, the INDEX function would do that. I guess there are similar functions, too.
Just browse them in the help_file - all the STRING_functions are on one page which is quite annoying whenever you look for a specific one, only for learning about all the possibilities and the syntax it's practical.
Probably a wildmatch which can be used to search for patterns in the field values.
Better load normally do modification for particular field in precceding load or resident load than drop the previous table