Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ORA App query with ODBC

Status
Not open for further replies.

ide

Programmer
Apr 10, 2001
236
EU
I have a query (bellow) in sql. Into the first line I insert an index command line.
Could I use it (and how?) in an Access query? Or give it anyway to the ODBC with dao, ado?

1000 x 10x
:)
ide

Code:
SELECT /*+ INDEX(INV.MTL_MATERIAL_TRANSACTIONS INV.MTL_MATERIAL_TRANSACTIONS_N15 INV.MTL_MATERIAL_TRANSACTIONS_N1 INV.MTL_MATERIAL_TRANSACTIONS_N8) */
--    INV.MTL_MATERIAL_TRANSACTIONS.CREATION_DATE AS ComplDate,
    SUBSTR(INV.MTL_TRANSACTION_LOT_NUMBERS.LOT_NUMBER,1,7) AS ChNo,
    SUM(INV.MTL_TRANSACTION_LOT_NUMBERS.TRANSACTION_QUANTITY) Qty
FROM
	INV.MTL_MATERIAL_TRANSACTIONS,
	INV.MTL_SYSTEM_ITEMS,
	INV.MTL_TRANSACTION_LOT_NUMBERS,
	WIP.WIP_ENTITIES
WHERE
	INV.MTL_SYSTEM_ITEMS.ORGANIZATION_ID = 227
	AND INV.MTL_MATERIAL_TRANSACTIONS.ORGANIZATION_ID = 227
	AND INV.MTL_TRANSACTION_LOT_NUMBERS.ORGANIZATION_ID = 227
	AND WIP.WIP_ENTITIES.ORGANIZATION_ID = 227
	AND INV.MTL_MATERIAL_TRANSACTIONS.CREATION_DATE BETWEEN '01-JAN-01' AND '31-JAN-01'
   	AND INV.MTL_MATERIAL_TRANSACTIONS.SUBINVENTORY_CODE BETWEEN '11H-KFEM' AND 'VESZELYES' --:SubInvHigh
	AND INV.MTL_SYSTEM_ITEMS.SEGMENT1 LIKE 'B6%'
	AND WIP.WIP_ENTITIES.WIP_ENTITY_ID(+) = INV.MTL_MATERIAL_TRANSACTIONS.TRANSACTION_SOURCE_ID
	AND INV.MTL_MATERIAL_TRANSACTIONS.INVENTORY_ITEM_ID = INV.MTL_SYSTEM_ITEMS.INVENTORY_ITEM_ID
	AND INV.MTL_TRANSACTION_LOT_NUMBERS.TRANSACTION_ID(+) = INV.MTL_MATERIAL_TRANSACTIONS.TRANSACTION_ID
	AND INV.MTL_MATERIAL_TRANSACTIONS.TRANSACTION_TYPE_ID IN(17,44)
	AND WIP.WIP_ENTITIES.WIP_ENTITY_NAME LIKE 'F-%'
	AND INV.MTL_TRANSACTION_LOT_NUMBERS.LOT_NUMBER LIKE '01%'
GROUP BY
--    INV.MTL_MATERIAL_TRANSACTIONS.CREATION_DATE,
    SUBSTR(INV.MTL_TRANSACTION_LOT_NUMBERS.LOT_NUMBER,1,7)
ORDER BY
	ChNo
--	ComplDate
 
ohh! I missed the forum! Sorry.. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top