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 9183099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:43:14+00:00 2026-06-17T18:43:14+00:00

I have a field in table in next format 1_2..1_10|1_6|1_8| where 1_2..1_10 include 1_2

  • 0

I have a field in table in next format 1_2..1_10|1_6|1_8| where 1_2..1_10 include 1_2, 1_3 and other.

How I can select data, where number = 1_3?

  • 1 1 Answer
  • 0 Views
  • 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. Editorial Team
    Editorial Team
    2026-06-17T18:43:16+00:00Added an answer on June 17, 2026 at 6:43 pm

    1st suggestion: Get rights to modify the db structure and figure out how to better store the Navision string.

    2nd suggestion: CLR

    I’ll assume you are relatively comfortable with each of these concepts. If you aren’t they are very well documented all over the web.

    My approach would be to use a CLR function as there’s going to be some high level things that are awkward in SQL that C# takes care of quite easily. The psuedo walk through would go something like this.

    Implementation

    1. Create a CLR funciton and implement it on the SQL server instance.
    2. Using SQL resultset change the query to look for the returned value of the CLR function based on the navision filter value where “1_3”.

    CLR Function Logic

    1. Create a c# function that takes in the value of the filter field and returns a string value.
    2. The CLR function splits the filter field by the | char into a list.
    3. Inside the CLR function create a second list. Iterate over the first list. When you find a ranged string split it on the “..” and manually add every available value between the range to the second list. When you find a value that isnt’ ranged simply add it to the second list.
    4. Join the contents of the second list together on the “|” charecter.
    5. Return the joined value.

    SQL Logic

    SELECT Field1,Field2...CLRFunctionName(FilterValue) AS FixedFilterValue FROM Sometable WHERE FixedFilterValue LIKE '%1_3%';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a mysql table field set as time type which stores data in
I have a table of data. I have a field which shows date. I
I have table a and b, each have an average field in them. Data
I have to get the records from a table field where Length of record/data/string
in my jqgrid i have field in a table which represents the id and
trasaction table description field have some value it is worked fine. description feild default
I have a field in a table which contains bitwise flags. Let's say for
Hi I have a field in mySql table called jobnumber which auto increments with
If I have a field in a table of some date type and I
Ok I'm using SQL Server 2008 and have a table field of type VARCHAR(MAX)

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.