Chris Michalczuk
asked on
problems with adding a line into a select statement in sql2000
I want to add a link to a view but I get an error with the output. where do I have to put the commas etc for the section after the AS OrdersComment bit that starts with http:/ in the select statement below?
SELECT ee.NewOrders_ID, ee.NewOrders_QuoteID, dbo.tbl_Orders.Orders_SON, dd.*, ee.NewOrders_Value AS OrderValue, dd.Users_Username AS Rep,
triscan_calls.dbo.UTC2Date (dbo.tbl_O rders.Orde rs_Created On) AS Created, dbo.tbl_Orders.Orders_Comm ent AS OrdersComment,
'http://sales.systems.com/php/Global/StandardDocs/xml.php?ViewDocument=true&ViewDocumentProposal=1&ViewDocumentQuoteID' + ee.NewOrders_QuoteID
AS Links
FROM dbo.tbl_Orders INNER JOIN
triscan_global.dbo.SiteVie w dd ON dd.Sites_ID = dbo.tbl_Orders.Orders_Site ID LEFT OUTER JOIN
vbi_quotes.dbo.tbl_NewOrde rs ee ON ee.NewOrders_SON = dbo.tbl_Orders.Orders_SON
WHERE (dbo.tbl_Orders.Orders_Sta tusID = 21)
SELECT ee.NewOrders_ID, ee.NewOrders_QuoteID, dbo.tbl_Orders.Orders_SON,
triscan_calls.dbo.UTC2Date
'http://sales.systems.com/php/Global/StandardDocs/xml.php?ViewDocument=true&ViewDocumentProposal=1&ViewDocumentQuoteID' + ee.NewOrders_QuoteID
AS Links
FROM dbo.tbl_Orders INNER JOIN
triscan_global.dbo.SiteVie
vbi_quotes.dbo.tbl_NewOrde
WHERE (dbo.tbl_Orders.Orders_Sta
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
yes, that should do it :)
ASKER
QuoteId was an INT datatype so using CAST solved the problem.
thanks
thanks