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)); }
private static string GetQueryStrByMainID(MDModel_QueryModel _qv, MDQuery_ResultTable _qrc) { List <string> _usedTables = new List <string>(); _usedTables.Add(_qv.MainTable.TableName); _usedTables.Add(_qrc.TableName); string _displayStr = OraQueryBuilder.CreateDisplayString(_qv, _qrc); string _conditionRes = CreateConditionStringByMainID(_qv); string _tableStr = OraQueryBuilder.CreateTableString(_qv, _usedTables); string _tableRelationStr = OraQueryBuilder.CreateTableRelationString(_qv, _usedTables); return(string.Format("select {0} from {1} where ( {2} ({3})) ", _displayStr, _tableStr, _tableRelationStr, _conditionRes)); }
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); }
private static string CreateCompareTableString(MDModel_QueryModel _qv, List <string> CompareUsedTableList) { string _a1 = OraQueryBuilder.CreateTableString(_qv, CompareUsedTableList); return(string.Format("{0},TEMP_IMPDATA", _a1)); }