Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Substr and Instr in Qlikview?

Having a tough time translating this SQL function to work as a load in Qlikview:

lower(substr(EMAIL_ADDRESS,instr(EMAIL_ADDRESS,'@'),length(EMAIL_ADDRESS))) "Email Domain"

essentially I'm loading just the @xxxxx.xxx of the email.

Any help would be greatly appreciated, thanks!

-Jason

Labels (1)
2 Replies
maxgro
MVP
MVP

load

     ....,

    lower(mid('alfa.beta@gmail.com', index('alfa.beta@gmail.com', '@'), len('alfa.beta@gmail.com'))) as [Email Domain],

    ....

from

    ....

replace 'alfa.beta@gmail.com' with EMAIL_ADDRESS

MarcoWedel
MVP
MVP

Hi,

instead of the "literal" translation to QlikView functions you could implement this function like this:

Lower(Mid(EMAIL_ADDRESS,Index(EMAIL_ADDRESS,'@')))

(using the 2 parameter version of the Mid() function)

or if there is always one '@':

Lower(SubField(EMAIL_ADDRESS,'@',2))

(not including the '@' in the result, but you might rather be interested in the domain name anyway, if not just preced with '@'&)


hope this helps


regards


Marco