Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
can any one explain mixmatch,wildmatch with example?
and match function with same example
?
match function i did pls explain me same example in mixmatc and wildmatch functions?
LOAD * INLINE [
Year, Test1, Test2
2000, 23 ,34
2001, 34, 65
2002, 22 ,33
2003, 45 ,67
2004, 34 ,34
2005, 45 ,55
2006, 56, 67
2007, 34, 11
2008, 23 ,34
2009, 34, 65
2010, 22 ,33
2011, 45 ,67
2012, 34 ,34
2013, 45 ,55
2014, 56, 67
2015, 34, 11
]
where not match (Year,'2000','2001','2002','2003','2004');
Hi,
The information from the help:
match( str, expr1 [ , expr2,...exprN ] )
The match function performs a case sensitive comparison.
Example:
match( M, 'Jan','Feb','Mar')
returns 2 if M = Feb
returns 0 if M = Apr or jan
mixmatch( str, expr1 [ , expr2,...exprN ] )
The mixmatch function performs a case insensitive comparison.
Example:
mixmatch( M, 'Jan','Feb','Mar')
returns 1 if M = jan
wildmatch( str, expr1 [ , expr2,...exprN ] )
The wildmatch function performs a case insensitive comparison and permits the use of wildcard characters ( * and ?) in the comparison strings.
Example:
wildmatch( M, 'ja*','fe?','mar')
returns 1 if M = January
returns 2 if M = fex
Regards,
Sergey
Hi,
The information from the help:
match( str, expr1 [ , expr2,...exprN ] )
The match function performs a case sensitive comparison.
Example:
match( M, 'Jan','Feb','Mar')
returns 2 if M = Feb
returns 0 if M = Apr or jan
mixmatch( str, expr1 [ , expr2,...exprN ] )
The mixmatch function performs a case insensitive comparison.
Example:
mixmatch( M, 'Jan','Feb','Mar')
returns 1 if M = jan
wildmatch( str, expr1 [ , expr2,...exprN ] )
The wildmatch function performs a case insensitive comparison and permits the use of wildcard characters ( * and ?) in the comparison strings.
Example:
wildmatch( M, 'ja*','fe?','mar')
returns 1 if M = January
returns 2 if M = fex
Regards,
Sergey
The Match() function can be used to compare strings, fields and variables using the string expression. The result of comparison is always an integer that shows the match expression. In the Match() function if no value is returned then the result would be 0. If an integer value is returned then the result would be 1. This function can used with the expression and it cannot be used with a chart, list box or text box. The Match() function will be used for a specified item in an array and then return the item in a specified position in a specified order. In the Match() the comparison is case sensitive.
Where to use Match() function
Hi Manoj,
In simple
Match() - is check whether the value is exists in the given set of values, it is similar IN() in Sql query
Syntax:
Match(DimensionName, Value1, Value2, Value3) etc.
Example:
Match(Month, 'Jan', 'Fab', 'Mar') -- If Month=Jan returns 1, Month = Feb returns 2.........
Note: Match is case sensitive Jan and jan are different values.
Mixmatch() - is check whether the value is exists in the given set of values, it is similar IN() in Sql query, in this the case is not considered both Jan and jan are same.
Syntax:
Mixmatch(DimensionName, Value1, Value2, Value3) etc.
Example:
Mixmatch(Month, 'Jan', 'Fab', 'Mar') -- If Month=Jan returns 1, Month = jan returns 1.........
Note: Mixmatch is case insensitive Jan and jan are same.
WildMatch - With this you can use wildcard characters to check the values also this is case insensitive
Syntax:
Wildmatch(DimensionName, Value1, Value2, Value3) etc.
Example:
Mixmatch(Month, 'Jan', 'jan*', 'Mar') -- If Month=Jan returns 1, Month = jan returns 1........., if Month ='janu' returns 2
Hope this helps you.
Regards,
Jagan.
Wildmatch ex:
LOAD * INLINE [
Year, Test1, Test2
2000, 23 ,34
2001, 34, 65
2002, 22 ,33
2003, 45 ,67
2004, 34 ,34
2005, 45 ,55
2006, 56, 67
2007, 34, 11
2008, 23 ,34
2009, 34, 65
2010, 22 ,33
2011, 45 ,67
2012, 34 ,34
2013, 45 ,55
2014, 56, 67
2015, 34, 11
]
where not WildMatch (Year,'201*');
in above case year 2010 onward will not load.
mixmatch example:
LOAD * INLINE [
Year,Month, Test1, Test2
2000,JAN, 23 ,34
2001,FEB, 34, 65
2002,mAR, 22 ,33
2003,jan, 45 ,67
2004,feb, 34 ,34
2005,Mar, 45 ,55
2006,JAn, 56, 67
2007,fEB, 34, 11
2008,MAR, 23 ,34
2009,jan, 34, 65
2010,feb, 22 ,33
2011,mar, 45 ,67
2012, jan,34 ,34
2013, feb,45 ,55
2014,mar, 56, 67
2015,jan, 34, 11
]
where MixMatch (Month,'jan','feb','mar');
this will load all data because mixmatch will do non casesensitivie comparison