• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 368
  • Last Modified:

colaesce the space

i have two tables
table a
postalcode
K1B 3G9
M1B 4H8
then
table b
K1B3G9
M1B4H8

i want to join table a and b who can i remove space for table a and join them.
0
sam2929
Asked:
sam2929
1 Solution
 
theartfuldazzlerCommented:
Hi

Use the COMPRESS function:


new_postal_code = COMPRESS(Old_postal_code);

0
 
Rajkumar GsSoftware EngineerCommented:
For SQL Server
select * from Table1 a 
  inner join Table2 b on replace(a.postalcode, ' ', '') = b.postalcode

Open in new window


Raj
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now