I am trying to compile a string as part of a select statement in SQL which converts a date time, firstly into the desired date format (103) and then into a VARCHAR for use in the string.
The following does not work:
dbo.SHOP_RESOURCE.DESCRIPTION + '-' + dbo.LABOR_TICKET.WORKORDER_BASE_ID + '-' + CONVERT (varchar, dbo.LABOR_TICKET.OPERATION_SEQ_NO) + '-' + dbo.WORK_ORDER.PART_ID + '-' + CAST(CONVERT (DATETIME, dbo.LABOR_TICKET.TRANSACTION_DATE, 103) AS VARCHAR)
Would anyone be able to help me out on this one? I'm sure it's going to be something really easy!