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!

Error: Unknown Table or correlation name!!!

Status
Not open for further replies.

knuckle05

Programmer
Dec 17, 2001
247
CA
Hi All,

I'm really stumped on this one, and am a newbie, which may be the reason. PLease take a look at this code.

I receive the error:

"Unknown table or correlation name [IMITMIDX] in select list"



SELECT "IMITMIDX"."ITEM_NO","IMINVLOC"."LOCATION","IMITMIDX"."DESCRIPTION_1","IMINVLOC"."STATUS","IMINVLOC"."INVENTORY_CLASS",
"IMINVLOC"."PRICE","IMINVLOC"."SALE_PRICE","IMINVLOC"."AVERAGE_COST","IMINVLOC"."LAST_COST","IMINVLOC"."STD_COST",
"IMINVLOC"."QTY_ON_HAND","IMITMIDX"."UNIT_OF_MEASURE","IMITMIDX"."PUR_UNIT_OF_MEASURE","IMITMIDX"."MFG_UOM",
"IMITMIDX"."ITEM_WEIGHT_UOM","IMITMIDX"."ITEM_WEIGHT","IMITMIDX"."PRODUCT_CATEGORY","IMITMIDX"."PART_CATEGORY",
"IMITMIDX"."USER_DEFINED_CODE","IMITMIDX"."MAT_TYPE","IMITMIDX"."DEFAULT_LOCATION", "IMINVTRX"."SOURCE",
"IMINVTRX"."QUANTITY","IMINVTRX"."OLD_QUANTITY", "IMINVTRX"."POST_DATE"

FROM "IMITMIDX" aa LEFT OUTER JOIN "IMINVLOC" bb ON ("IMITMIDX"."ITEM_NO" = "IMINVLOC"."ITEM_NO") LEFT OUTER JOIN "IMINVTRX" cc ON ("IMINVLOC"."ITEM_NO" = "IMINVTRX"."ITEM_NO"
AND "IMINVLOC"."LOCATION" = "IMINVTRX"."LOCATION")
WHERE "cc"."POST_DATE"

IN

(SELECT MAX("IMINVTRX"."POST_DATE")
FROM "IMITMIDX" xx LEFT OUTER JOIN "IMINVLOC" yy ON ("IMITMIDX"."ITEM_NO" = "IMINVLOC"."ITEM_NO") LEFT OUTER JOIN "IMINVTRX" zz ON ("IMINVLOC"."ITEM_NO" = "IMINVTRX"."ITEM_NO"
AND "IMINVLOC"."LOCATION" = "IMINVTRX"."LOCATION")
WHERE ("aa"."ITEM_NO" = "IMINVTRX"."ITEM_NO")
)


GROUP BY "IMITMIDX"."ITEM_NO","IMINVLOC"."LOCATION","IMITMIDX"."DESCRIPTION_1","IMINVLOC"."STATUS","IMINVLOC"."INVENTORY_CLASS",
"IMINVLOC"."PRICE","IMINVLOC"."SALE_PRICE","IMINVLOC"."AVERAGE_COST","IMINVLOC"."LAST_COST","IMINVLOC"."STD_COST",
"IMINVLOC"."QTY_ON_HAND","IMITMIDX"."UNIT_OF_MEASURE","IMITMIDX"."PUR_UNIT_OF_MEASURE","IMITMIDX"."MFG_UOM",
"IMITMIDX"."ITEM_WEIGHT_UOM","IMITMIDX"."ITEM_WEIGHT","IMITMIDX"."PRODUCT_CATEGORY","IMITMIDX"."PART_CATEGORY",
"IMITMIDX"."USER_DEFINED_CODE","IMITMIDX"."MAT_TYPE","IMITMIDX"."DEFAULT_LOCATION","IMINVTRX"."SOURCE", "IMINVTRX"."QUANTITY","IMINVTRX"."OLD_QUANTITY"


 
Where are you issuing that statement? Is it in the PCC or an application? If it's your application, what cursor library are you using? I've heard of a problem using the Microsoft cursor library causing a similar error in some cases. info@mirtheil.com
Custom VB and Btrieve development.
Certified Pervasive Developer
Certified Pervasive Technician
 
I'm issuing it from the PCC. Once I get it woring I will take the SQL string and put it in my VB code. Is there anything wrong with my syntax??
 
As you rename "IMITMIDX" to aa in the from clause you must use that name instead

SELECT aa."ITEM_NO" -- etc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top