總結個人常用的一些查詢條件,涉及方面比較廣泛,不斷更新中:
1.接收人:
select distinct name from ***xx_inv_operator_v;
2.離散任務狀態:
select to_char(ml.lookup_code), ml.meaning
from mfg_lookups ml
where ml.lookup_type = 'wip_job_status'
3.工單型別:
select t.class_code from wip_accounting_classes t
select w.class_code from wip_discrete_classes_all_v w where substr(w.class_code, 1, 1) = 'd'
4.子庫存庫房:
select * from mtl_secondary_inventories
5.採購員:
select distinct per.person_id, pa.agent_name 姓名, hou.name 部門
from per_people_v7 per,
per_assignments_f f,
hr_organization_units hou,
po_agents_v pa
where per.person_id = f.person_id
and f.organization_id = hou.organization_id
and hou.name = 'cgbu採購部'
and per.full_name = pa.agent_name
--order by pa.agent_name;
6.物料編碼九段說明:
1)大類;7.**商列表2)小類;
3)工藝;
4)用途;
5)規格;
6)配方;
7)採購標示;
8)品牌;
9)級別;
21)小類編碼;
61)配方編碼;
其他
8.查詢事務處理型別
select mtt.transaction_type_id, mtt.transaction_type_name
from mtl_transaction_types mtt
SQL常用條件查詢語句
select from table1 where 工資 2500 and 工資 3000 同上 select 姓名 from table1 where 性別 0 and 工資 4000 select from table1 where not 工資 3200 select from table1 o...
多表查詢建表語句
1.學生表 student s id,s name,s birth,s 學生編號,學生姓名,出生年月,學生性別 2.課程表 course c id,c name,t id 課程編號,課程名稱,教師編號 3.教師表 teacher t id,t name 教師編號,教師姓名 4.成績表 score s...
常用的SQL建表語句
1 更改錶子字段的長度 alter table table name modify col name varchar2 6 2 更改表字段的名字 alter table table name rename column col name1 to col name2 3 刪除表字段 alter tab...