A community member has associated this post with a similar question:
Azure Data Studio: Querying information based on the imported flat file.

Only moderators can edit this content.

SQL: Query that finds the ID from a string

Sherlan Emmanuel Burgonia 86 Reputation points
2022-09-19T05:10:05.34+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.

242309-image.png

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?

Developer technologies | Transact-SQL
Developer technologies | Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
SQL Server | Other
{count} votes

2 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more