diff sqlpyPlus.py @ 135:4c59f4a8b680

wrestling with multi table names in from clause
author catherine@Elli.myhome.westell.com
date Thu, 28 Aug 2008 07:53:44 -0400
parents b532bc8430a6
children 2e69a257b6ab
line wrap: on
line diff
--- a/sqlpyPlus.py	Wed Aug 27 22:27:17 2008 -0400
+++ b/sqlpyPlus.py	Thu Aug 28 07:53:44 2008 -0400
@@ -513,6 +513,9 @@
     tableNameRegex = re.compile(
         r'(from|update)\s+(([a-zA-Z0-9_#$]+)\.)?([a-zA-Z0-9_#$]+)\s+',
         re.IGNORECASE | re.DOTALL | re.MULTILINE)
+    tableNameRegex = re.compile(
+        r'(from|update)(.*)(where|set)',
+        re.IGNORECASE | re.DOTALL | re.MULTILINE)        
     columnNameRegex = re.compile(
         r'select\s+(.*)from',
         re.IGNORECASE | re.DOTALL | re.MULTILINE)