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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-04-22 : 20:18:56
|
Bob writes "I am querying several tables using zipcodes. My problem is that one table stores the zip as XXXXX-XXXX (I have no control over whether the suffix exists or not) and the other master zip table contains only five digit zips. When I do tblZIP1.zipcode = tblZIP2.zipcode I only get data where the zip is 5 chars. I can do a "LIKE" statement but when you are bouncing off 41,000 zipcodes, this can take a while.
Is there anyway to trim the 10 char zip (XXXXX-XXXX) before the two are compared? In the SQL?" |
|
|
|
|
|