Hi,
I am doing this query succesfully in MySQL and I wonder why the LIKE does not work the same in MSSQL. Is there any way arround?
MySQL: SELECT * FROM tariffs WHERE '4321' LIKE concat(prefix,' %')
MSSQL: SELECT * FROM tariffs WHERE '4321' LIKE (prefix + '%')
the MSSQL query returns NULL always.
The long workarround is to make a: WHERE prefix = '4321' OR prefix = '432' OR prefix = '43' OR prefix = '4'
but I want to avoid this.
Anybody knows a workaround?
Thanks
I am doing this query succesfully in MySQL and I wonder why the LIKE does not work the same in MSSQL. Is there any way arround?
MySQL: SELECT * FROM tariffs WHERE '4321' LIKE concat(prefix,' %')
MSSQL: SELECT * FROM tariffs WHERE '4321' LIKE (prefix + '%')
the MSSQL query returns NULL always.
The long workarround is to make a: WHERE prefix = '4321' OR prefix = '432' OR prefix = '43' OR prefix = '4'
but I want to avoid this.
Anybody knows a workaround?
Thanks
Comment