Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 124269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T04:25:07+00:00 2026-05-11T04:25:07+00:00

I am trying to find a way to query rows of data by using

  • 0

I am trying to find a way to query rows of data by using a ‘multivalue’ pipe delimited column in another table as a WHERE clause. SQL SERVER 2005

This is my best description of the problem:

Imagine a pipe delimited column set to a variable like @LIST = ‘Bob|Mary|Joe’

then I am trying to find a match like this

Select * from Users where FirstName = 'Joe' 

but extended to be

Select * from Users where FirstName 'IS CONTAINED IN' @List 

which would return all the Bob, Mary and Joe entries. Thanks for your help.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T04:25:08+00:00Added an answer on May 11, 2026 at 4:25 am

    You can use a split udf and join it to your main query. see this link for the code and an example. Your query would end up looking like this. This is untested but hopefully this points you in the right direction.

    Select A.* from Users A JOIN dbo.Fn_Split(@ValueArrayString, '|') B on A.FirstName = B.value  
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to find the rows that are in one table but not another,
I'm trying to find a way to convert this very complex SQL Query into
I am trying to find the best way to build a dynamic linq query
I'm trying to make a query, but I can't find a way to do
I am trying to find a way to increment a second primary key column
I'm trying to find a way to match a query to a regular expression
I am trying to find a way to query a RNG schema while avoiding
I'm trying to find a way to cause SQLAlchemy to generate a query of
I'm trying for hours to find out the correct SQL query to select the
Hi I am trying to find all rows in my database (SQL Server) which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.