diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index c23e9aefb3cf..e4ba3e959997 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -2695,7 +2695,7 @@ OUString OSQLParseNode::getTableRange(const OSQLParseNode* _pTableRef) OSL_ENSURE(_pTableRef && _pTableRef->count() > 1 && _pTableRef->getKnownRuleID() == OSQLParseNode::table_ref,"Invalid node give, only table ref is allowed!"); const sal_uInt32 nCount = _pTableRef->count(); OUString sTableRange; - if ( nCount == 2 || (nCount == 3 && !_pTableRef->getChild(0)->isToken()) || nCount == 5 ) + if ( nCount == 2 || (nCount == 3 && !_pTableRef->getChild(0)->isToken()) ) { const OSQLParseNode* pNode = _pTableRef->getChild(nCount - (nCount == 2 ? 1 : 2)); OSL_ENSURE(pNode && (pNode->getKnownRuleID() == OSQLParseNode::table_primary_as_range_column @@ -2703,7 +2703,7 @@ OUString OSQLParseNode::getTableRange(const OSQLParseNode* _pTableRef) ,"SQL grammar changed!"); if ( !pNode->isLeaf() ) sTableRange = pNode->getChild(1)->getTokenValue(); - } // if ( nCount == 2 || nCount == 3 || nCount == 5) + } // if ( nCount == 2 || nCount == 3 ) return sTableRange; }