------------ Query One --------------
SELECT endshare.orderno, endshare.ship_via, endshare.nvalue, endshare.bill_weigh, endshare.sname, endshare.scompany, endshare.saddr1, endshare.saddr2, endshare.scity, endshare.sstate, endshare.szipcode, endshare.scountry, endshare.sphone1, endshare.semail, endshare.usi_status, endshare.ship_date, endshare.BOX_ID, endshare.ORDERNO, ProductType.searchtext
FROM endshare
join items on items.orderno = endshare.orderno
join stock on items.item = stock.number
join ProductType on stock.assoc = ProductType.prodtype
WHERE endshare.orderno=318850
------------ Query Two --------------
DECLARE @searchtext VARCHAR(1024)
SELECT
@searchtext = COALESCE(@searchtext + ',', '') + searchtext
FROM
ProductType
SELECT ProductType = @searchtext
|