Hello all, I just upgraded servers and we are now using sql server 2008 rather than sql server 2000. I have some scripts to convert since they are giving me errors about "Multi-Part Identifier could not be bound". Below is one of my scripts that if I can get to work Im just I can convert the rest that I have. Let me know what you think is wrong guys. Thank you
Code:
DELETE tblPriceGrabberFeed INSERT INTO tblPriceGrabberFeed
(availability, categorization, condition, image_url, manufacturer_name, manufacturer_part_number, price,
product_description, product_name, product_url, shipping_cost, unique_retailer_id)
SELECT 'yes' AS availability,
'Automotive' + ' > ' + tblCompany.name + ' > ' + tblCategoryParts.partsCategory + ' > ' + tblCategoryCompany.companyCategory
AS categorization, 'New' AS condition,
'[URL unfurl="true"]http://www.domain.com/images/'[/URL] + CASE WHEN tblProduct.image = 0 THEN 'product/medium1/' + REPLACE(tblCompany.name,
' ', '%20') + '%20' + REPLACE(REPLACE(tblProduct.productName, ' ', '%20'), '-', '%20')
+ '.jpg' WHEN tblProduct.image = 1 THEN 'productSpecific/medium1/' + REPLACE(tblCompany.name, ' ', '%20')
+ '%20' + REPLACE(REPLACE(tblProduct.productCode, ' ', '%20'), '-', '%20') + '.jpg' END AS image_url,
tblCompany.name AS manufacturer_name, tblProduct.productCode AS manufacturer_part_number,
tblProduct.salePrice AS price, tblCompany.name + ' ' + tblProduct.productName + ' ' + CONVERT(varchar,
ISNULL(tblProduct.beginYear, '')) + '-' + CONVERT(varchar, ISNULL(tblProduct.endYear, ''))
+ ' ' + ISNULL(tblCarMake.make, '') + ' ' + ISNULL(tblCarModel.model, '') + ' ' + ISNULL(tblProduct.otherLimiters, '')
+ ' ' + ISNULL(tblProduct.otherText, '') + ' ' + ISNULL(tblProduct.notes, '')
+ ' > ' + tblCategoryCompany.companyCategory + ' > ' + tblCategoryParts.partsCategory + ' ' + tblProduct.productCode AS product_description,
tblCompany.name + ' ' + tblProduct.productName + ' ' + ' ' + ISNULL(tblCarMake.make, '')
+ ' ' + ISNULL(tblCarModel.model, '') + ' ' + ISNULL(tblProduct.otherLimiters, '') + ' ' + CONVERT(varchar,
ISNULL(tblProduct.beginYear, '')) + '-' + CONVERT(varchar, ISNULL(tblProduct.endYear, ''))
+ ' ' + tblProduct.productCode AS product_name, '[URL unfurl="true"]http://www.gripmotorsports.com/pi~pn~'[/URL] + REPLACE(tblCompany.name,
' ', '+') + '+' + REPLACE(tblProduct.productName, ' ', '+') + '+' + REPLACE(tblCarMake.make, ' ', '+')
+ '+' + REPLACE(tblCarModel.model, ' ', '+') + '-' + CONVERT(varchar, tblProduct.ID) + '.html' AS product_url,
tblProduct.shippingCostSingle AS shipping_cost, tblProduct.ID AS unique_retailer_id
FROM tblProduct INNER JOIN
tblCompany ON tblProduct.company = tblCompany.ID INNER JOIN
tblCarMake ON tblProduct.carMake = tblCarMake.ID INNER JOIN
tblCarModel ON tblProduct.carModel = tblCarModel.ID INNER JOIN
tblCategoryCompany ON tblProduct.companyCategory = tblCategoryCompany.ID INNER JOIN
tblCategoryParts ON tblProduct.partsCategory = tblCategoryParts.ID
WHERE tblProduct.salePrice IS NOT NULL