public DataSet GetContractTerm(string prodKey, int propLinkID, OleDbConnection conn) { string sQuery; string Prod_Friendly_Name = string.Empty; sQuery = "select distinct VAL_ID, VAL_NAME from PPSR_OWNER.ppsr_q2o_att_data_v where attribute_name = 'CONTRACT TERM' ORDER BY VAL_NAME ASC"; DataSet dsContractTerm = new DataSet(); try { dsContractTerm = CCBusiness.Utility.OracleHelperUtility.ExecuteDataset(conn, sQuery); } catch (Exception e) { CCBusiness.Utility.OracleHelperUtility.LogPPSRError(System.Web.HttpContext.Current, e); throw e; } return dsContractTerm; } private string GetContractName(DataSet ds, string contractID) { string contractname = string.Empty; for (int contract = 0; contract < ds.Tables[0].Rows.Count; contract++) { if (contractID == ds.Tables[0].Rows[contract]["VAL_ID"].ToString()) { contractname = ds.Tables[0].Rows[contract]["VAL_NAME"].ToString(); break; } } return contractname; }
ORDER BY CAST(VAL_NAME AS NUMBER)
select distinct VAL_ID, VAL_NAME from PPSR_OWNER.ppsr_q2o_att_data_v where attribute_name = 'CONTRACT TERM' ORDER BY Convert(Decimal,VAL_NAME) ASC
TO_NUMBER
VAL_NAME
NUMBER
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)