SELECT ComputerName, time, REPLACE(room, 'OU=CL_','') FROM ComputerInvTracking
ORDER BY CONVERT (datetime, time, 103) DESC
I am trying to select three columns from a table to generate a report, but would like to strip out some of the information contained in the 'room' column. The information I would like to strip is two different strings within the same field, the first of which is shown in the code above, the second of which I can't remember at the moment, but is just a string of characters.
The code above is what I have so far, but it doesn't work! I could be on completely the wrong track... I am getting this error:
[rsFieldReference] The Value expression for the textbox ‘room’ refers to the field ‘room’. Report item expressions can only refer to fields within the current data set scope or, if inside an aggregate, the specified data set scope.
Using MS SQL.
If anyone has any suggestions, it would be much appreciated!