Bob's SQL:
select
CONTENT
"料號"
from
T_DISENABLE_MATERIAL_INFO
where
ITEM='M'
and
DOCUMENT_ID=4329
select
CONTENT
"DC"
from
T_DISENABLE_MATERIAL_INFO
where
ITEM='D'
and
DOCUMENT_ID=4329
select
CONTENT
"LOTNO"
from
T_DISENABLE_MATERIAL_INFO
where
ITEM='C'
and
DOCUMENT_ID=4329
select
CONTENT
"廠商名稱"
from
T_DISENABLE_MATERIAL_INFO
where
ITEM='V'
and
DOCUMENT_ID=4329
select
CONTENT
"廠商代碼"
from
T_DISENABLE_MATERIAL_INFO
where
ITEM='N'
and
DOCUMENT_ID=4329
Wallace's SQL
select
max(decode(item,'M',content,'')) "料號",
max(decode(item,'D',content,''))
DC,
max(decode(item,'C',content,''))
LOTNO,
max(decode(item,'V',content,'')) "廠商名稱",
max(decode(item,'N',content,'')) "廠商代碼" from
T_DISENABLE_MATERIAL_INFO where
DOCUMENT_ID=4329
posted on 2009-09-07 20:12
Ke 阅读(2851)
评论(0) 编辑 收藏 所属分类:
oracle