public java.lang.String getHavingList( java.lang.String pStart,
java.lang.String pPattern,
java.lang.String pSeparator,
java.lang.String pEnd)
Alternative syntax:
public java.lang.String getHavingList(
java.lang.String pPattern,
java.lang.String pSeparator)
Offers a list of the occurrences of SQL HAVING of an interface.
The parameter pPattern is interpreted and repeated for each element of the list, and separated from its predecessor with the parameter pSeparator. The generated string begins with pStart and ends with pEnd.
This list contains one element for each HAVING expression to execute on the source or target (depends on the Knowledge module that uses it).
In the alternative syntax, any parameters not set are set to an empty string.
Parameter |
Type |
Description |
---|---|---|
pStart |
String |
This parameter marks the beginning of the string to generate. |
pPattern |
String |
The pattern is repeated for each occurrence in the list. The list of authorized attributes in a pattern is detailed in the table « Pattern Attributes List » Each attribute occurrence in the pattern string is substituted with its value. The attributes must be between brackets ([ and ]) Example « My string [COL_NAME] is a column » |
pSeparator |
String |
This parameter separates each pattern from its predecessor. |
pEnd |
String |
This parameter marks the end of the string to generate. |
The following table lists the different values of the parameters as well as the associated description.
Parameter value |
Description |
---|---|
ID |
Internal identifier of the clause |
EXPRESSION |
Text of the having expression |
insert into <%=odiRef.getTable("L", "COLL_NAME",
"W")%>
select <%=getColList("", "[EXPRESSION]", ",
", "", "INS=1")%>
from <%=odiRef.getFrom()%>
where (1=1)
<%=odiRef.getJoin()%>
<%=odiRef.getFilter()%>
<%=odiRef.getGrpByList("group by ", "[EXPRESSION]",
" , ", "")%>
<%=odiRef.getHavingList("having ", "([EXPRESSION])",
" and ", "")%>
Explanation: The getHavingList function will be used to generate the having clause of the select order that must start with "having" and that repeats a pattern (each aggregated filtered expression) separated by "and" for each expression.
The first parameter "having " of the function indicates that we want to start the string with "having"
The second parameter "([EXPRESSION])" indicates that we want to repeat this pattern for each aggregated filter. The keyword [EXPRESSION] references a valid keyword of the table Pattern Attributes List
The third parameter" and " indicates that we want to separate each interpreted occurrence of the pattern with the string " and ".
The fourth parameter "" of the function indicates that we want to end the string with no specific character