Share via

SQL: Query that finds the ID from a string

Anonymous
2022-09-19T03:28:35+00:00

Hi I'm starting to learn SQL and I was given a list of IDs to look for in a query. Here's the sample table.

ID Column1 Column2 Column3 Column4
123
124
125
126
127
128
129
130
131
132

However, the IDs I'm looking for in the database has extra strings on it for example in the database ID 123 is '000123'. How can I use the WHERE ID IN function to work on that?

Microsoft 365 and Office | Install, redeem, activate | For business | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2022-09-19T03:42:37+00:00

    Hi, sfburgonia

    Good day!

    Thank you for posting to Microsoft Community. We are happy to help you.

    According to your description, the issue of your concern that you would like to use the function in SQL query.

    Please be kindly to understand that we're Office 365 Outlook team, therefore, we would like to refer you to the right place - sql-server-general who dedicating into SQL with rich experience and more resources.

    We believe they will give you a quick respond and solve it soon for you.

    Thanks in advance that your understanding would be highly appreciated.

    Thanks for your cooperation and have a nice day.

    Sincerely,

    Alex | Microsoft Community Moderator.

    Was this answer helpful?

    0 comments No comments