sqlparser/language.cpp
// Parse modulo (remainder) MOD operator in Teradata 
Parse modulo (remainder) MOD operator in Teradata
Parse modulo ( remainder ) MOD operator in Teradata
bool SqlParser::ParseModOperator(Token *first)
{
	if(first == NULL)
		return false;
	Token *first_end = GetLastToken();
	Token *mod = GetNext("MOD", L"MOD", 3);
	if(mod == NULL)
		return false;
	Token *second = GetNextToken();
	if(second == NULL)
		return false;
	ParseExpression(second);
	Token *second_end = GetLastToken();
	if(Target(SQL_ORACLE) == true)
	{
		Prepend(first, "MOD(", L"MOD(", 4, mod);
		AppendNoFormat(first_end, ",", L",", 1);
		AppendNoFormat(second_end, ")", L")", 1);
		Token::Remove(mod);
	}
	return true;
}
bool SqlParser :: ParseModOperator ( Token * first ) { if ( first == NULL ) return false ; Token * first_end = GetLastToken ( ) ; Token * mod = GetNext ( " " , L" " , 3 ) ; if ( mod == NULL ) return false ; Token * second = GetNextToken ( ) ; if ( second == NULL ) return false ; ParseExpression ( second ) ; Token * second_end = GetLastToken ( ) ; if ( Target ( SQL_ORACLE ) == true ) { Prepend ( first , " " , L" " , 4 , mod ) ; AppendNoFormat ( first_end , " " , L" " , 1 ) ; AppendNoFormat ( second_end , " " , L" " , 1 ) ; Token :: Remove ( mod ) ; } return true ; }
Parse modulo (remainder) MOD operator in Teradata
Parse modulo ( remainder ) MOD operator in Teradata
// Second expression // MOD function in Oracle