Bonjour,
SVP, j'ai un code SQL qui contient plusieurs unions :
Je veux remplacer union avec la fonction substr parce que la seule difference avec union, c'est le segment3 like '% '
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 select segement1,segment2 from mtl,mbb where iwhere mtl.inventory_item_id = mbb .inventory_item_id and micv.segment1 in ('MFID-MPC') and micv.CATEGORY_SET_NAME like 'A%' and mtl.segment3 like '%10' and mtl.costing_enabled_flag = 'N' union select segement1,segment2 from mtl,mbb where iwhere mtl.inventory_item_id = mbb .inventory_item_id and micv.segment1 in ('MFID-MPC') and micv.CATEGORY_SET_NAME like 'A%' and mtl.segment3 like '%11' union and mtl.costing_enabled_flag = 'N' select segement1,segment2 from mtl,mbb where iwhere mtl.inventory_item_id = mbb .inventory_item_id and micv.segment1 in ('MFID-MPC') and micv.CATEGORY_SET_NAME like 'A%' and mtl.segment3 like '%20' and mtl.costing_enabled_flag = 'N'
Aidez-moi svp.
Partager