예제 #1
0
        private static string GetMainTableQueryStr(MDModel_QueryModel _qv, MDCompare_Request compareRequest)
        {
            MDQuery_Request _queryRequest       = compareRequest as MDQuery_Request;
            List <string>   _QueryUsedTableList = OraQueryBuilder.GetQueryUsedTable(_qv, _queryRequest);
            string          _conditionRes       = CreateConditionStringByMainID(_qv);
            string          _tableStr           = OraQueryBuilder.CreateTableString(_qv, _QueryUsedTableList);
            string          _tableRelationStr   = OraQueryBuilder.CreateTableRelationString(_qv, _QueryUsedTableList);
            string          _displayStr         = OraQueryBuilder.CreateDisplayString(_qv, compareRequest.MainResultTable);

            return(string.Format("select distinct {0} from {1},COMP_TEMP where ( {2} ({3})) ", _displayStr, _tableStr, _tableRelationStr, _conditionRes));
        }
예제 #2
0
        private static string CreateFilterStr(MDModel_QueryModel _qv, MDCompare_Request compareRequest)
        {
            string _res = "";

            MDQuery_Request _queryRequest       = compareRequest as MDQuery_Request;
            List <string>   _QueryUsedTableList = OraQueryBuilder.GetQueryUsedTable(_qv, _queryRequest);
            string          _filterStr          = OraQueryBuilder.CreateDataFilterStr(_qv);
            string          _conditionStr       = OraQueryBuilder.CreateConditionString(_qv, _queryRequest);
            string          _tableStr           = OraQueryBuilder.CreateTableString(_qv, _QueryUsedTableList);
            string          _tableRelationStr   = OraQueryBuilder.CreateTableRelationString(_qv, _QueryUsedTableList);
            string          _displayStr         = string.Format("{0}.{1} MAINID", _qv.MainTable.TableName, _qv.MainTable.TableDefine.Table.MainKey);

            _res = string.Format("select DISTINCT {0} from {1} where {4} ( {2} ({3})) ", _displayStr, _tableStr, _tableRelationStr, _conditionStr, _filterStr);

            return(_res);
        }