WarcraftPlayer
MIS
I need to make the bold number dynamic. The query works fine. The problem is when I pull the data gets pulled, the javascript on this third party software does not like the ending spaces (The tracking numbers vary in length). If the software was ours I could fix it on that end but that is not an option the data has to go in with out spaces on the end. Is there any kind of TRIM command in SQL to cut off the extra spaces? I have tried rtrim. Maybe its not the white spaces?
Code:
INSERT INTO Table2 (Customerid, UserId, Comments,TrackingNumber,Comment_Date)
SELECT Customerid, UseridAdded, Line, '2|' + SUBSTRING ( Line , CHARINDEX('#', Line,2)+3 , [b]30[/b]),DateAdded
From Table1
WHERE Line Like '%FEDX Tracking #%' OR Line Like '%FEDEX Tracking #%' AND Customerid = 'ABC123'