Link to home
Start Free TrialLog in
Avatar of Chris Michalczuk
Chris MichalczukFlag for United Kingdom of Great Britain and Northern Ireland

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_Orders.Orders_CreatedOn) AS Created, dbo.tbl_Orders.Orders_Comment 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.SiteView dd ON dd.Sites_ID = dbo.tbl_Orders.Orders_SiteID LEFT OUTER JOIN
                      vbi_quotes.dbo.tbl_NewOrders ee ON ee.NewOrders_SON = dbo.tbl_Orders.Orders_SON
WHERE     (dbo.tbl_Orders.Orders_StatusID = 21)
ASKER CERTIFIED SOLUTION
Avatar of ralmada
ralmada
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Guy Hengel [angelIII / a3]
yes, that should do it :)
Avatar of Chris Michalczuk

ASKER

QuoteId was an INT datatype so using CAST solved the problem.

thanks