Skip to content
Advertisement

SQL exclude wildcard from WHERE

We’ve got a query on SAP which has some potential to cause problems.

Somebody put the wildcard (%) into the prompt and of course everything got clogged up.

Is there a way to disallow the wildcard in the WHERE, maybe with a CASE or something? The only other alternative I could come up with was to only select the top 1000 or something but I wondered if there was a better way.

Many thanks.

Advertisement

Answer

Can you remove it in WHERE clause something like below?

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement