I have a Query Script like this:
SELECT View1.OrderDate,View1.Email,SUM(View1.TotalPayments) FROM dbo.View1
WHERE (View1.OrderStatus = 'Completed')
GROUP BY View1.OrderDate,View1.Email
HAVING
(SUM(View1.TotalPayments) > 75);
Is there any approach that we can pull some key information out from SQL query? such as table name and column name ,I have 2 question:
- I did search I found some parser such as ANTLR , but I could not find documentation that explain the using of this parser in C# language.
- Is there any way we can use Entity Frame Work to parsing sql query? My queries are fully dynamic and they are created at run time