Link to home
Start Free TrialLog in
Avatar of debschultz
debschultzFlag for United States of America

asked on

SQL 2008 Reporting Services

Need help in how to effectively write this custom code for my report.  I have a field that houses truck numbers and for the report need to correct errors.  Example:  Truck numbers W01 can be entered as W-01, W-O1, WO1 - these go up to 09.  Also truck numbers ZUC01 are entered as ZUC-01, ZUC-O1, ZUCO1 and go up to 09.  Suggestions would be grealy appreciated on the most effective way to code this.
Avatar of Kyle Abrahams, PMP
Kyle Abrahams, PMP
Flag of United States of America image

I would just update your table:

update table set <column> = replace(<Column>, '-', '')

if you just wanted to do it on the select

select replace(<Column>, '-', ''), *
from table
Avatar of debschultz

ASKER

Great idea but since I have 3 different situations being the - or -O or just O how do I get all 3 in that statement
I've requested that this question be closed as follows:

Accepted answer: 0 points for debschultz's comment #a39294358

for the following reason:

Although it may not be as tough of a question the response was amazing and right on.
Replacing the - will allow for comparison and allow it to be grouped.  Please note you selected you own question as the solution, did you mean to accept mine?
ASKER CERTIFIED SOLUTION
Avatar of Kyle Abrahams, PMP
Kyle Abrahams, PMP
Flag of United States of America 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