/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
OnlineDB/EcalCondDB/sql/pvss_getaliasfordevice_func.sql
17 строк
578 B
Giulio Eulisse
Snapshot of CMSSW_6_2_0_pre8.
26 июн 2013, 18:12
26 июн 2013, 18:12
214ab73
Код
Авторство
О чём код?
CREATE OR REPLACE function getAliasForDevice(DPEName in varchar2) return varchar2 is alias aliases.alias%type; DPName varchar2(1000); dotLocation number; begin --get the name of the DP itself, not an element dotLocation:=instr(DPEName,'.'); if dotLocation>0 then DPName:=substr(DPEName,1,dotLocation); end if; select alias into alias from (select alias from aliases where dpe_name=DPName order by since desc) where rownum=1; --perhaps should do something if there is no record... but for now I think we want there to always be one. return alias; end; / show errors;