Suppose there is a table Text.

Data:

[Id] [Val] 1 Hello world 2 Helloworld 3 Hello world 

You need to make a query of the type SELECT * FROM Text WHERE Val = 'Helloworld'

And so that as a result there were all these three lines

Well, that is it is necessary that the query selects values ​​without taking into account spaces (there may be a lot of them).

MSSQL

  • 3
    REPLACE(Val, ' ', '') ='Helloworld' - vikolyada
  • Yes, it worked. - Tima

1 answer 1

 SELECT * FROM Text WHERE Val like 'Hello%world'