getHavingList() Method

Usage

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)

Description

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.

Parameters

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.

Pattern Attributes List

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

Examples

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.