I have a column in a table containing a sort of social security number. The mask for these numbers are nnnnnn-nnnn (750701-1234). I want to use the input of only numbers to be able to find the right post, for example if I search for "7507011234" I want the SQLquery to actually find the post containing "750701-1234".
So, I've tried the following:
...and a couple of variants but I'm not getting this to work. Is this the way to do it or is there another way, perhaps to SELECT only numbers from the 'Pnr'-column?
Any ideas someone?
So, I've tried the following:
Code:
SELECT ID, Pnr, KortNr
FROM tbl_Person
WHERE (Replace(Pnr, '-', '')) = '7507011234'
Any ideas someone?