Sql Scripts – Simple Stuff
I have a Volusion.com website for ecommerce. They offer sql abilities for processing data. I need someone who can write simple scripts to do various import/exports of data.
I need sql that will write out cvs data files for differnet shopping websites. Google (see below), Amazon, Ebay and others to be determined.
The example script is for Google. However, I wish to make it only export for specific products (flagged).
I will generally want a sql in a day or two.
Example:
SELECT
p.ProductCode AS id
, p.ProductName AS [stripHTML-title]
, IsNull(pe.Google_Product_Type,’n/a’) AS product_type
, IsNull(pe.SalePrice,pe.ProductPrice) AS price
, IsNull(pe.ProductManufacturer,’n/a’) AS brand
, IsNull(pe.ProductCondition,’NEW’) AS condition
, CONVERT(VARCHAR(10), (GETDATE() + 30),120) AS expiration_date
, pd.ProductDescription AS [stripHTML-description]
, ‘Config_FullStoreURLConfig_ProductPhotosFolder/’ + p.ProductCode + ‘-2.jpg’ AS image_link
, ‘Config_FullStoreURLProductDetails.asp?ProductCode=’ + p.ProductCode + ‘&click=2′ AS link
FROM Products p
INNER JOIN Products_Descriptions pd ON p.ProductID = pd.ProductID
INNER JOIN Products_Extended pe ON pd.ProductID = pe.ProductID
WHERE (p.IsChildOfProductCode is NULL OR p.IsChildOfProductCode = ”)
AND (p.HideProduct is NULL OR p.HideProduct <> ‘Y’)
AND (pe.ProductPrice > 0)
ORDER BY p.ProductCode


