Information générale
Forum:
Microsoft SQL Server
I want to search by using '817145779' into Area table below:
AreaCode
80
801
81
817
8171 --> this is the most accurate pattern
81715
818
82
821
If I run, SELECT * FROM AREA WHERE AREACODE = '817145779' then it will return nothing, because no record match inside 'Area' table, but now what I need is to get the most accurate record pattern in AreaCode field inside the 'Area' table, in this case if I want to search '817145779' then I want it return '8171' because this record is the most accurate record pattern..
any idea?
Thanks a lot in advance
Regards
Winanjaya
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement