sqlparser/language.cpp
// String concatenation CONCAT operator in DB2
String concatenation CONCAT operator in DB2
String concatenation CONCAT operator in DB2
bool SqlParser::ParseConcatOperator(Token *first)
{
	if(first == NULL)
		return false;
	Token *concat = GetNextWordToken("CONCAT", L"CONCAT", 6);
	if(concat == NULL)
		return false;
	Token *second = GetNextToken();
	if(second == NULL)
		return false;
	ParseExpression(second, SQL_OPERATOR_CONCAT);
	if(_target == SQL_SQL_SERVER)
		Token::Change(concat, "+", L"+", 1);
	else
	if(_target == SQL_ORACLE)
		Token::Change(concat, "||", L"||", 2);
	return true;
}
bool SqlParser :: ParseConcatOperator ( Token * first ) { if ( first == NULL ) return false ; Token * concat = GetNextWordToken ( " " , L" " , 6 ) ; if ( concat == NULL ) return false ; Token * second = GetNextToken ( ) ; if ( second == NULL ) return false ; ParseExpression ( second , SQL_OPERATOR_CONCAT ) ; if ( _target == SQL_SQL_SERVER ) Token :: Change ( concat , " " , L" " , 1 ) ; else if ( _target == SQL_ORACLE ) Token :: Change ( concat , " " , L" " , 2 ) ; return true ; }
String concatenation CONCAT operator in DB2
String concatenation CONCAT operator in DB2
// CONCAT keyword // Parse the second and other expressions recursively // Change to + operator in SQL Server // Change to || operator in Oracle 