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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Is there an equivalnet to Oracle Substr in Qlikview

Is there something that is close to an Oracle substr in Qlikview

Oracle Substring:

substr('This is a test', 6)would return 'is a test'


I have see the Subfield and SubStringCount however they do not meet my requirment.

Thanks,

Divya

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

p406 of the manual:

mid( s , n1 [ , n2 ] )


Substring of the string s. The result is the string starting at character
n1 with the length of n2 characters. If n2 is omitted, the function
returns the rightmost part of the string starting at character n1. The
positions in the string are numbered from 1 and up.


Examples:
mid('abcdef',3 ) returns 'cdef'.
mid('abcdef',3, 2 ) returns 'cd'.
mid( Date,3 ) where Date = 970714 returns 0714
mid( Date,3,2 ) where Date = 970714 returns 07

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

4 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

p406 of the manual:

mid( s , n1 [ , n2 ] )


Substring of the string s. The result is the string starting at character
n1 with the length of n2 characters. If n2 is omitted, the function
returns the rightmost part of the string starting at character n1. The
positions in the string are numbered from 1 and up.


Examples:
mid('abcdef',3 ) returns 'cdef'.
mid('abcdef',3, 2 ) returns 'cd'.
mid( Date,3 ) where Date = 970714 returns 0714
mid( Date,3,2 ) where Date = 970714 returns 07

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi, you could use the function Mid('This is a text',1,6); this return 'This i'

Regards

Not applicable
Author

Thank you very much ..Some time its easy to be LOST IN FUNCTION !!!! 🙂

Not applicable
Author

there are three functions that u can use:

left(<string>,n)

right(<string>,n)

mid(<string>,n,n)