Dbhelp myDbhelp = new Dbhelp();
OracleConnection myOracleConnection = myDbhelp.getConnection();
myDbhelp.open();
string str = "select concat('E',substr(concat('00000000',COALESCE(to_char(to_number(max(to_number('00000000'||ltrim(AS_EQUIPMENTID,'E'))))+1),'1')),-8)) str from AS_ASSETS";//编号自动增长
OracleCommand cmd = new OracleCommand(str, myOracleConnection);
string id = cmd.ExecuteScalar().ToString();
return id;
OracleConnection myOracleConnection = myDbhelp.getConnection();
myDbhelp.open();
string str = "select concat('E',substr(concat('00000000',COALESCE(to_char(to_number(max(to_number('00000000'||ltrim(AS_EQUIPMENTID,'E'))))+1),'1')),-8)) str from AS_ASSETS";//编号自动增长
OracleCommand cmd = new OracleCommand(str, myOracleConnection);
string id = cmd.ExecuteScalar().ToString();
return id;