Expand|Select|Wrap|Line Numbers
- update [translation-new].dbo.products
- set
- tp.thumbnail = 'graphics/00000001/thumbs/'+td.ProdImage+'.jpg',
- tp.image = 'graphics/00000001/'+td.ProdImage+'.jpg',
- tp.descrip = td.ProdDescription+'<BR><BR>'+td.MarketingDescription
- from
- [translation-new].dbo.products as tp, datapaq.dbo.cnetprodinfo as td
- where tp.TDProdID = td.ProdID;
Expand|Select|Wrap|Line Numbers
- Msg 402, Level 16, State 1, Line 37
- The data types text and varchar are incompatible in the add operator.
Expand|Select|Wrap|Line Numbers
- insert into
- [translation-new].dbo.comersusproducts
- (suppliername, sku, description, details, smallimageurl, imageurl, price, listprice, cost, weight,
- length, height, width, recordsource)
- select
- datapaq.dbo.datapaq.manufacturername, datapaq.dbo.datapaq.manufacturerprodid, datapaq.dbo.datapaq.proddescription,
- datapaq.dbo.datapaq.proddescription, 'graphics/00000001/thumbs/'+datapaq.dbo.cnetprodinfo.prodimage+'.jpg',
- 'graphics/00000001/'+datapaq.dbo.cnetprodinfo.prodimage+'.jpg', datapaq.dbo.datapaq.msrp, datapaq.dbo.datapaq.msrp,
- datapaq.dbo.price.prodprice, datapaq.dbo.datapaq.prodweight, datapaq.dbo.datapaq.prodlength,
- datapaq.dbo.datapaq.prodheight, datapaq.dbo.datapaq.prodwidth, 'TD'
- from
- datapaq.dbo.cnetprodinfo, datapaq.dbo.datapaq, datapaq.dbo.price
- where
- datapaq.dbo.cnetprodinfo.prodid = datapaq.dbo.datapaq.prodid
- AND
- datapaq.dbo.cnetprodinfo.prodid = datapaq.dbo.price.prodid;
Expand|Select|Wrap|Line Numbers
- update tp
- set
- tp.thumbnail = (select 'graphics/00000001/'+ProdImage+'.jpg' from datapaq.dbo.cnetprodinfo where prodid = td.prodid),
- tp.image = (select 'graphics/00000001/thumbs'+ProdImage+'.jpg' from datapaq.dbo.cnetprodinfo where prodid = td.prodid),
- tp.descrip = (select proddescription+'<br><br>'+marketingdescription from datapaq.dbo.cnetprodinfo where prodid = td.prodid)
- from
- [translation-new].dbo.products as tp, datapaq.dbo.cnetprodinfo as td
- where tp.TDProdID = td.ProdID;
The marketingdescription and proddescription, are text types. i dont think ill be able to make them varchar as some of these descriptions are pretty big. Also, the field i am copying these to, is a text type. so it seems to be a limitation of the + operator on the datatype. So i guess the question in short is....
How do you merge "textfield1" & 'text string' & "textfield2", where textfield is a field that is of type "text". For example if the fields above pull from the database:
textfield1 = 'This is product description 1'
textfield2 = 'This is product description 2'
the value updated in the cart table, for the [full product description] is:
"This is product description 1text stringThis is product description 2"
Thanks
--Dave