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

  • Home
  • SEARCH
  • 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 6379587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:09:27+00:00 2026-05-25T02:09:27+00:00

How to parse such a query to sql?.. or Do you know any open

  • 0

How to parse such a query to sql?.. or
Do you know any open source parsers which can parse it:

(((adsfa ≤ "value") AND (adsfa > "value")) OR (adsfa = "value")) 
AND (adsfa ≤ "value") OR ((adsfa ≤ "value") AND (adsfa ≤ "value")) 
AND (adsfa ≤ "value")

I’ve tried to build my own algorithm with string.Split(stringSeparators,StringSplitOptions.RemoveEmptyEntries)
algorithm is getting more and more complicated but i’m finding more combinations that it can’t parse.


  • adsfa is column name
  • ≤ is operator
  • “value” is value

UPDATED: Thank you all, may be I’ll use one of the parsers in the next version.

  • 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-05-25T02:09:27+00:00Added an answer on May 25, 2026 at 2:09 am

    I developed something like this myself using the Irony library. It’s still in alpha, but has been stable for me so far. Note though that I used it to parse expressions that were written by other programmers, not user input.

    Here’s another idea – if you trust the source of the query, and just need to convert it to proper SQL, maybe a few simple string.Replace() would be enough? It’s practically SQL already, just the operators are weird characters.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can Html Agility Pack be used to parse an html string fragment? Such As:
How can I parse such xml, having one node and different arguments in it
Can anybody give an idea about how to parse such an xml and store
I would like to parse a string such as p1=6&p2=7&p3=8 into a NameValueCollection .
I want to parse a descriptive-style URL with slashes (such as server/books/thrillers/johngrisham/thefirm ), in
I am trying to build an ANTLR grammar that parses tagged sentences such as:
for example i'd need to create something like google search query parser to parse
I've a project which ask me to do such a BIG search engine but
I know this error is usually a problem with unclosed quotes and such, but
How to parse huge JSON file in Android? When I parse such file I

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.