Got more questions? Find advice on: ASP | SQL | XML | Windows
in Search
Welcome to RegexAdvice Sign in | Join | Help

Browse by Tags

All Tags » sql query » .net
  • split SQL SELECT query

    Hello,  I've been trying to write a regex that would split any sql select query and capture different clauses to the groups. That is, there should be 5 groups (eg. top, select, from, where, order) each containing corresponding text (the group is empty if the clause is missing). For example, lets try and split this query: SELECT  ...
    Posted to Construction Advice (Forum) by geriadejes on May 2, 2007
  • Re: advice for simple SQL where clause expression

    Here you go: (?i)^\[[^\]]+\]\.\[[^\]]+\]\s+(?:LIKE|=|<|>|<>|<=|>=)\s+(?:'[^']*'|\d+)(?:\s+AND\s+\[[^\]]+\]\.\[[^\]]+\]\s+(?:LIKE|=|<|>|<>|<=|>=)\s+(?:'[^']*'|\d+))?\s*$
    Posted to Construction Advice (Forum) by eSquire on May 1, 2007