Discussion Board for collaboration related to QlikView App Development.
In may data table the following field exits
I have written above syntax and but in the results Retrun 'OTHERS' for record. Pls tell where I am wrong
Your subfield Syntax is wrong
Whatever function you came through in qlikview is well explained in QlikView help itself
From Help file
subfield(s, 'delimiter' [ , index ] )
In its three-parameter version, this script function returns a given substring from a larger string s with delimiter 'delimiter'. index is an optional integer denoting which of the substrings should be returned. If index is omitted when subfield is used in a field expression in a load statement, the subfield function will cause the load statement to automatically generate one full record of input data for each substring that can be found in s.
In its two-parameter version, the subfield function generates one record for each substring that can be taken from a larger string s with the delimiter 'delimiter'. If several subfield functions are used in the same load statement, the Cartesian product of all combinations will be generated.
(For three parameters)
subfield(S, ';' ,2) returns 'cde' if S is 'abc;cde;efg'
subfield(S, ';' ,1) returns NULL if S is an empty string
subfield(S, ';' ,1) returns an empty string if S is ';'
Subfield() is used to extract substring components from a parent string field, where the original record fields consist of two or more parts separated by a delimiter.
The Subfield() function can be used, for example, to extract first name and surname from a list of records consisting of full names, the component parts of a path name, or for extracting data from comma-separated tables.
If you use the Subfield() function in a LOAD statement with the optional field_no parameter left out, one full record will be generated for each substring. If several fields are loaded using Subfield() the Cartesian products of all combinations are created.
SubField(text, delimiter[, field_no ])
Return data type: string
|text||The original string. This can be a hard-coded text, a variable, a dollar-sign expansion, or another expression.|
|delimiter||A character within the input text that divides the string into component parts.|
|field_no||The optional third argument is an integer that specifies which of the substrings of the parent string text is to be returned. Use the value 1 to return the first substring, 2 to return the second substring, and so on. A negative value causes the substring to be extracted from the right-hand side of the string. That is, the string search is from right to left, instead of left to right, if field_no is a positive value.|