All Downloads are FREE. Search and download functionalities are using the official Maven repository.

sql.oracle.selectStatement.vm Maven / Gradle / Ivy

## $stat  : com.squid.core.sql2.statement.SelectStatement
## $skin : com.squid.core.sql2.render.SQLSkin
##
##-- Template: default SQL ANSI, V2.0

##-- LIMIT part
#if ($stat.hasLimitValue())
SELECT
*
FROM
(
#end

SELECT
#if ($stat.isStyleDistinct())
	DISTINCT
#end
#if ($stat.isStyleAsterisk())
	*
#end
#foreach ($expr in $stat.SelectPieces) 
	#if ($velocityCount>1),
	#end
	$expr.render($skin)
#end
##
## FROM
##
#if ($stat.FromPieces.isEmpty())
  ${skin.renderEmptyFromClause()}
#else
FROM 
#foreach ($expr in $stat.FromPieces) 
	#if ($velocityCount>1),
	#end
	${expr.render($skin)}
#end
#end
##
## WHERE clause
##
#if ($stat.hasWherePieces())
WHERE
#foreach ($expr in $stat.WherePieces)
	#if ($velocityCount>1)AND
	#end
	(${expr.render($skin)})
#end
#end
##
## GROUP BY clause
##
${stat.getGroupByPiece().render($skin)}
##
## HAVING clause
##
#if ($stat.hasHavingPieces())
HAVING
#foreach ($expr in $stat.HavingPieces)
	#if ($velocityCount>1)AND
	#end
	(${expr.render($skin)})
#end
#end
##
## ORDER BY clause
##
#if ($stat.hasOrderByPieces())
ORDER BY
#foreach ($expr in $stat.OrderByPieces)
	#if ($velocityCount>1),
	#end
	${expr.render($skin)}
#end
#end
##-- LIMIT part
#if ($stat.hasLimitValue())
)
WHERE ROWNUM <= $stat.getLimitValue()
#end
##-- OFFSET part is not supported

 




© 2015 - 2025 Weber Informatics LLC | Privacy Policy