Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
littlewing
Starting Member
33 Posts |
Posted - 2005-12-14 : 09:03:09
|
| Hello, is there a way to strip characters from a column when SELECTing so that my SELECT statement will find the record (cannot use a LIKE clause)?Example:Column: PartNumber (nvarchar, 100) Sample data in PartNumber12-34(5) 33445-3Aw23 7(ws-33)My select has to be an exact match so if submitted @Partnumber = 12345then the query should find the first record. (I strip non-alphanumerics on the input string before it reaches the query so if user enters 12-34(5), @Partnumber will be 12345.)Something like:SELECT * from tblParts WHERE dbo.StripNonAlphanumericCharacters(PartNumber) = @PartnumberIS a function like that possible?Thank you.LW |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|