C#问题 数据库中两个字段数据 在表中一个字段显示出来

来源:百度知道 编辑:UC知道 时间:2024/05/14 05:52:17
(select i.vendor_po from enc_vendor_po i where i.vendor_id=a.customer_code and i.vendor_pn=e.product_code)+''+(select i.vendor_poline from enc_vendor_po i where i.vendor_id=a.customer_code and i.vendor_pn=e.product_code)
这是我写的 不行 望高手指点

select i.vendor_po || i.vendor_poline vendor_name from enc_vendor_po i where i.vendor_id=a.customer_code and i.vendor_pn=e.product_code

如果你用的数据库是oracle的话,这个SQL语句就可以了。
vendor_name是这个拼凑好的字段的别名。可以随便写。

你写的太麻烦了,而且不能这样写,两个查询结果不能用“+”连起来
我看了下,没看明白你要写什么,但是你可以这样弄:
select a.x1,b.x2,c.x3 from tab1 a,tab2 b,tab3 c where a.id=b.id and a.name=c.name

用结构体!