Interesting... Looks like several nested derived tables. ~Brad
-----Original Message----- From: DRE [mailto:[EMAIL PROTECTED] Sent: Monday, August 07, 2006 4:04 PM To: CF-Talk Subject: OT ? Sql View Weird Item? Hi, I've run across this view in a sql 7 db. Please note right after the from clause, there looks like a table name before any of the join parameters and lots of parenthesis in the same area. I've never seen this and I couldnt find it in any of my sql books. Can anybody share any insight? It seems to run in 7 but not in 2k? DRE SELECT item.itemID AS ProdID, numOfBlank + itemName AS ProdName, catalogCategoryGroup + ' - ' + catalogCategory AS ProdCat, item.itemDesc AS ProdDesc, CASE WHEN classCartPrice.priceList = NULL AND itemCartPrice.priceList = NULL THEN '0' ELSE CASE WHEN classCartPrice.priceList IS NULL THEN itemCartPrice.priceList ELSE classCartPrice.priceList END END AS priceList, CASE WHEN classCartPrice.memberPriceList = NULL AND itemCartPrice.memberPriceList = NULL THEN '0' ELSE CASE WHEN classCartPrice.memberPriceList IS NULL THEN itemCartPrice.memberPriceList ELSE classCartPrice.memberPriceList END END AS memberPriceList, 1 AS VendorID, 'Bradford Publishing' AS Vendor, item.dlvryType, '' AS DlvryFmt, '' AS FilePath, '' AS FileName, '' AS FileSize, 0 AS ShipCost, 10 AS DaysToExp, 1 AS Taxable, 0 AS catDiscount, item.classID, class.class FROM ((class RIGHT JOIN (catalogCategoryGroup RIGHT JOIN ((item LEFT JOIN itemToCatalogCategory ON item.itemID = itemToCatalogCategory.itemID) LEFT JOIN catalogCategory ON itemToCatalogCategory.catalogCategoryID = catalogCategory.catalogCategoryID) ON catalogCategoryGroup.catalogCategoryGroupID = catalogCategory.catalogCategoryGroupID) ON class.classID = item.classID) LEFT JOIN classCartPrice ON class.classID = classCartPrice.classID) LEFT JOIN itemCartPrice ON item.itemID = itemCartPrice.itemID -- DRE www.webmachineinc.com www.theanticool.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:249062 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

