create or replace function getGoodsMsgForProtocol( str_in in varchar2,str_classId in varchar2)--分类字
return varchar2
is
str_list varchar2(4000) default 'null';--连接后字符串
str_int number(2) default 0;
begin
for x in ( select goods.goodsname,goods.specs from t_Goods goods
where goods.id=str_in) loop
str_list :=x.goodsname||'='||x.specs||' ';
str_int:=+1;
end loop;
if str_list='null' and str_int=0 then
for x in ( select goodshistory.goodsname,goodshistory.specs from t_Goodshistory goodshistory
where goodshistory.goodsid=str_in) loop
str_list :=x.goodsname||'='||x.specs||' ';
str_int:=+1;
end loop;
end if;
if str_list='null' and str_int=0 then
for x in ( select ac.acname,ac.specs from t_accessory ac
where ac.id=str_in) loop
str_list :=x.acname||'='||x.specs||' ';
str_int:=+1;
end loop;
end if;
if str_list='null' and str_int=0 then
for x in ( select ach.acname,ach.specs from t_accessoryhistory ach
where ach.id=str_in) loop
str_list :=x.acname||'='||x.specs||' ';
str_int:=+1;
end loop;
end if;
if str_list='null' and str_int=0 then
for x in ( select gs.goodsclassname from t_goodsclass gs
where gs.id=str_classId) loop
str_list :=x.goodsclassname||'='||' ';
str_int:=+1;
end loop;
end if;
return str_list;
end;
分享到:
相关推荐
.net WindowForm窗体编程,C#利用DataGridView控件实现二维表头
C#实现DataGridView二维表头与合计栏,最简单的代码,实现二维表头
DataGridView 控件不能实现二维表头,这里对该控件进行扩展,该代码主要部分来自网络,自己在里面进行了一些修改,增加了一些事件操作。 该资源包含两个小项目,一为控件扩展源码,另一个为示例源码,以便大家更容易...
实现2-10标准二维表问题.cpp
很好的东西
实现了DataGridView单元格行合并和DataGridView二维表头的示例及源码
winform 二维表头的实现 自定义控件
DataGridView二维表头和合并单元格 实现二维的合并表头,以及数据行单元格合并
二维及多维链表及其算法实现二维及多维链表及其算法实现二维及多维链表及其算法实现
DataGridView单元格合并和二维表头 值得深入贯彻学习,了解精髓。
我写的二维链表程序(采用非递归算法实现了二维链表程序),大家可以自由使用!如果有更好的算法请给我回复.
Excel二维表数据转SELECT CASE 工具将EXCEL二维表数据(第一列会成为case内容,后面支持N列),转化为SELECTCASE,实现快速编程,同时也让你的程序无需读取数据库而运行更快。程序员必备哈。 Excel二维表数据转...
DataGridView单元格合并和二维表头,固定合计行,带行号表格。DataGridView实现添加合计行并始终显示在底部 DataGridView中没有合适的方法来冻结底部的合计行,这里用一种比较简单的方式实现。 1. 数据部分的...
用二维链表模拟生物群落的繁衍过程。实验平面中的每个生物周围生活着八个生物(上下左右左上右上左下右下),其中有两个活着则中心生物状态不变,有三个活着则中心生物也活着,其它情况中间生物死亡,按此规律不断...
json简单的解析,一个c#实现的万能解析器,数据库转化为json格式,序列化反序列化,文件信息转化json
将TXT文件中的数据读进二维数组,并对列数据进行线性插值再以txt文件将数据输出
适合初学java程序设计的新手。分别使用一维、二维数组的方法对乘法表打印实现