Solved

How do I query a listing of unique numbers against a column in a SQL database?

Posted on 2011-02-17
2
241 Views
Last Modified: 2012-05-11
How do I query a listing of unique numbers against a column in a SQL database? For instance, I would like to find/return all matching records from comma delimited list (abc123, abc124, abc125, abc126, etc). I really don't want to search for them individually.
0
Comment
Question by:prophyt
2 Comments
 
LVL 23

Accepted Solution

by:
wdosanjos earned 500 total points
ID: 34920398
Do you mean something like this?

select * from YourTable where YourColumn in ('abc123', 'abc124', 'abc125', 'abc126')

0
 

Author Comment

by:prophyt
ID: 34920466
I know it was easy... thanks.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
CONVERT date time to a different time zone. 2 71
Restrict result set 1 43
Unable to save view in SSMS 21 79
Parsing this XML works but the other one doesn't 9 27
There are some very powerful Data Management Views (DMV's) introduced with SQL 2005. The two in particular that we are going to discuss are sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats.   Recently, I was involved in a discu…
Introduction This article will provide a solution for an error that might occur installing a new SQL 2005 64-bit cluster. This article will assume that you are fully prepared to complete the installation and describes the error as it occurred durin…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question