top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

SQL code generation from table-free boolean queries?

0 votes

Given string input such as:
foo=5 AND a=6 AND date=now OR date='2013/6' AND bar='hello'

I am going to implement:

  • boolean understanding (which operator takes precendence)
  • spliting off of attributes into my function which computes their table in the SQL database
  • piece everything together into an SQL query

However, it came to me that this is probably a very generic thing; and there might be a library for it.

If that's so, can you recommend it?

posted Jun 26, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

It sounds like you might want to use pyparsing and start with something akin to this

answer Jun 26, 2013 by anonymous
Similar Questions
+4 votes

I just started rewritting my project from python 2 to python 3. I noticed that there are these new parameter and return value annotations. I have docstrings everywhere in my project, but I plan to convert many of them into annotations. The question is: what kind of auto documenting system should I use for this? Previously I have used Sphinx. Is it okay to use that for python 3 source code? Is there a better alternative?

0 votes

What I am trying to do. I have a table which has 2 columns - QC_Check and Query. For each QC_Check I have a query. There are several records like this.

Is there a way using SQL transformation that, I can fetch the SQL query stored in the Query column to Informatica, run the queries in Teradata and get the results stored somewhere.

+3 votes

How to convert c # inline queries into stored procedure written in transact sql?