Tony Pearce
asked on
My SQL Query, append text to a result and add new default results??
Hi,
I have this query( in code box):
The line:
xcart_products.productid AS link
I actually need to add 'http://www.mydomain.com/product.php?id=' before to returned number.
I also need to add an extra colum with todays date automatically added??
I would normally add these on the page but this is being exported directly form Navicat to an CSV file.
Help!!!!!!!!!
Tony
I have this query( in code box):
The line:
xcart_products.productid AS link
I actually need to add 'http://www.mydomain.com/product.php?id=' before to returned number.
I also need to add an extra colum with todays date automatically added??
I would normally add these on the page but this is being exported directly form Navicat to an CSV file.
Help!!!!!!!!!
Tony
SELECT
xcart_products.productcode AS id,
xcart_products.product AS title,
xcart_products.list_price*1.15 AS price,
xcart_products.descr AS description,
xcart_products.avail AS quantity,
xcart_products.forsale,
xcart_products.weight AS weight,
xcart_categories.category AS product_type,
xcart_manufacturers.manufacturer AS brand,
xcart_quick_flags.image_path_T AS image_link,
xcart_products.productid AS link
FROM
xcart_products
Inner Join xcart_products_categories ON xcart_products_categories.productid = xcart_products.productid
Inner Join xcart_categories ON xcart_categories.categoryid = xcart_products_categories.categoryid
Inner Join xcart_manufacturers ON xcart_manufacturers.manufacturerid = xcart_products.manufacturerid
Inner Join xcart_quick_flags ON xcart_quick_flags.productid = xcart_products.productid
ASKER
that works great, thanks, any idea how to add a new column result with a default value??
Tony
Tony
couldn't get the question:
Do u mean adding to table?
ALTER TABLE tablename MODIFY colNAME <DATATYPE> DEFAULT <VALUE>;
Do u mean adding to table?
ALTER TABLE tablename MODIFY colNAME <DATATYPE> DEFAULT <VALUE>;
ASKER
Sorry, I'm not being clear...
I am producing a froogle feed from Navicat, unfortunatly the database does not have all the fields required, so when running the query I need to output extra results set to a default value...
I am producing a froogle feed from Navicat, unfortunatly the database does not have all the fields required, so when running the query I need to output extra results set to a default value...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thats it,
Thanks so much.......
Thanks so much.......
ASKER
Thanks so much.....
select concat( 'http://www.mydomain.com/product.php?id=' ,FIELDNAME) as aliasfieldname .....