Skip to content
Advertisement

How to check if an int contains another one as part of it?

The question is fairly clear. I wanna check if for example a number x is contained in another number y. And I wanna do it in SQL (also in LINQ if possible). Additionally those integer values(y values) are Ids from a table. So when LINQ is concerned, I am not looking for some general solution like:

Examples:

Answers can be based on a table like the following:

Advertisement

Answer

You can cast them to varchar first

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