linux下c 编写的 某项目代理服务端部分的代码。其中包括网络通信

源代码在线查看: function.sql

软件大小: 714 K
上传用户: ebay321
关键词: linux 编写 代理 服务端
下载地址: 免注册下载 普通下载 VIP

相关代码

				create or replace function city_no(v_city_no in varchar)
				return varchar is 
					v_name varchar(12);
				begin
					select name into v_name
					from para_city_no 
					where city_no=v_city_no;
					return(v_name);
					exception
					  when others then 
						return -9;
				end;
				/
				
				create or replace function agency_no(v_agency_no in varchar)
				return varchar is 
					v_name varchar(12);
				begin
					select name into v_name
					from para_agency_no 
					where agency_no=v_agency_no;
					return(v_name);
					exception
					  when others then 
						return -9;
				end;
				/
				
				
				create or replace function Alarm_Status_No(v_Alarm_Status_No in varchar)
				return varchar is 
					v_name varchar(12);
				begin
					select name into v_name
					from para_Alarm_Status_No
					where Alarm_Status_No=v_Alarm_Status_No;
					return(v_name);
					exception
					  when others then 
						return -9;
				end;
				/
				
				
				create or replace function Alarm_Level_No(v_Alarm_Level_No in varchar)
				return varchar is 
					v_name varchar(12);
				begin
					select name into v_name
					from para_Alarm_Level_No
					where Alarm_Level_No=v_Alarm_Level_No;
					return(v_name);
					exception
					  when others then 
						return -9;
				end;
				/
				
				create or replace function Alarm_name_No(v_Alarm_name_No in varchar)
				return varchar is 
					v_name varchar(20);
				begin
					select name into v_name
					from para_Alarm_name_No
					where Alarm_name_No=v_Alarm_name_No;
					return(v_name);
					exception
					  when others then 
						return -9;
				end;
				/
				
				
				create or replace function Alarm_name_level(v_Alarm_name_No in varchar)
				return varchar is 
					v_level varchar(1);
				begin
					select ALARM_LEVEL_NO into v_level
					from para_Alarm_name_No
					where Alarm_name_No=v_Alarm_name_No;
					return(v_level);
					exception
					  when others then 
						return -9;
				end;
				/
				
				create or replace function Alarm_name_No(v_Alarm_name_No in varchar)
				return varchar is 
					v_name varchar(20);
				begin
					select name into v_name
					from para_Alarm_name_No
					where Alarm_name_No=v_Alarm_name_No;
					return(v_name);
					exception
					  when others then 
						return -9;
				end;
				/
				
				create or replace function Alarm_Site_No(v_Alarm_Site_No in varchar)
				return varchar is 
					v_name varchar(80);
					v_name1 varchar(80);
				begin
					select name,name_trans into v_name,v_name1
					from para_Alarm_Site_No
					where Alarm_Site_No=v_Alarm_Site_No;
					if v_name1 is null then 
						return(v_name);
					else 
						return(v_name1);
					end if;
					exception
					  when others then 
						return -9;
				end;
				/
				
				create or replace function ci(v_Alarm_Site_No in varchar)
				return varchar is 
					v_name varchar(10);
				begin
					select ci into v_name
					from para_Alarm_Site_No
					where Alarm_Site_No=v_Alarm_Site_No;
						return(v_name);
					exception
					  when others then 
						return -9;
				end;
				/
				
				create or replace function Alarm_Site_name(v_name in varchar)
				return varchar is 
					v_site varchar(80);
				begin
					select max(alarm_site_no) into v_site
					from para_Alarm_Site_No
					where name_trans=v_name or name=v_name;
					  return(v_site);
					exception
					  when others then 
						return -9;
				end;
				/
				
				create or replace function Site_bound(v_Alarm_Site_No in varchar)
				return varchar is 
					v_bound number(5);
				begin
					select bound into v_bound
					from para_Alarm_Site_No
					where Alarm_Site_No=v_Alarm_Site_No;
					return(v_bound);
					exception
					  when others then 
						return -9;
				end;
				/			

相关资源