VFP 9
SP2
DBFs are inside a DBC
Tables:
Inventory Master table
ICItem (Index: item, itmdesc, itemclass, itemsubclass, itemcategory, manufacturer,condition, itemcolor, barcode)
Inventory Location Table (could have more than 1 location per item/Warehouse ID bascially)
ICILoc (Index: item, locitem, Item+LocID, ItmDesc)
Inventory Item SKUS( each item could have multiple SKUs or aliases of SKUs)
ICItemSKU (Index: item, SKU)
I have a search form, where the user can search inventory using keyword searching, which finds the occurance of the string in the fields of inventory, based on my sql select below.
that works great..however I would like to see how i can speed up my search form. Especially, when the Item Location table (ICIloc has 100k+ records)
Ali Koumaiha
TeknoSoft Inc.
Michigan
SP2
DBFs are inside a DBC
Tables:
Inventory Master table
ICItem (Index: item, itmdesc, itemclass, itemsubclass, itemcategory, manufacturer,condition, itemcolor, barcode)
Inventory Location Table (could have more than 1 location per item/Warehouse ID bascially)
ICILoc (Index: item, locitem, Item+LocID, ItmDesc)
Inventory Item SKUS( each item could have multiple SKUs or aliases of SKUs)
ICItemSKU (Index: item, SKU)
I have a search form, where the user can search inventory using keyword searching, which finds the occurance of the string in the fields of inventory, based on my sql select below.
that works great..however I would like to see how i can speed up my search form. Especially, when the Item Location table (ICIloc has 100k+ records)
Code:
lcStr = '%LG%' && this is usually coming from the search box.. but, for here, i just put it like that.
lcLocID = 'TEKNOSOFT'
SELECT ;
.f. as llSelect, ;
icitem.ITEM,;
icitem.ItmDesc,;
icitem.ProdLine,;
icitem.ItemClass,;
icitem.ItemSubClass,;
icitem.ItemCategory,;
icitem.Manufacturer,;
icitem.Condition,;
icitem.ItemColor, ;
NVL(iciloc.lOnhand,0000) AS lOnhand, ;
NVL(iciloc.lOnhand-iciloc.lsoalloc,0000) AS AvailQty,;
iciloc.Price,;
iciloc.Price1,;
iciloc.Price2,;
icitem.MiscInfo, ;
IIF(icitem.OEM,'Yes','No ') AS OEM,;
iciloc.LocID ;
FROM icitem ;
LEFT OUTER JOIN iciloc ;
ON icitem.ITEM = iciloc.ITEM ;
WHERE iciloc.LocID = lcLocID ;
AND (;
icitem.item like lcStr OR ;
icitem.itmdesc like lcStr OR ;
prodline like lcStr OR ;
itemclass like lcStr OR ;
itemsubclass like lcStr OR ;
ItemCategory like lcStr OR ;
Manufacturer like lcStr OR ;
Condition like lcStr OR ;
ItemColor like lcStr OR ;
MiscInfo like lcStr OR ;
icitem.Barcode like lcstr OR ;
icitem.item in (SELECT item FROM ICItemSKU WHERE SKU LIKE lcStr) ;
);
ORDER BY icitem.ITEM,icitem.ProdLine,icitem.ItemClass
Ali Koumaiha
TeknoSoft Inc.
Michigan