lazierthanthou / sqlite-manager

Manage all your sqlite databases using this lightweight extension for firefox, thunderbird, seamonkey, komodo etc.
http://lazierthanthou.github.io/sqlite-manager/
325 stars 133 forks source link

Running view in both SQLite-Manager and SQLiteStudio...regexp not recognized #88

Open curleb opened 7 years ago

curleb commented 7 years ago

Inconsistent results in use of regexp under SQLite-Manager (0.8.3.1) vs SQLiteStudio (3.1.1):

SQLiteManager: Likely SQL syntax error: PRAGMA "main".table_info("vw_template_page_a") [ **no such function: regexp** ]
Exception Name: NS_ERROR_FAILURE
Exception Message: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [mozIStorageConnection.createStatement]

Following query functions as expected in SQLiteStudio:

SELECT 
         templ_id                        my_templ 
        ,CASE 
            WHEN xml_content regexp ('ss:ExpandedColumnCount="11" ') 
               or xml_content regexp ('^  </Table>$') 
            THEN NULL 
            ELSE row_no 
         END                             page_start 
        ,NULL                            page_end 
        ,'[' 
            || xml_content 
            || ']' 
                                         xml_content 
FROM 
         _template                       templ 
WHERE 
         xml_content 
            regexp ('<Table |</Table>') 
AND      page_start 
            IS NOT NULL 
GROUP BY 
         my_templ 
        ,row_no
curleb commented 7 years ago

Scratch that.

It appears to be an internal SQLiteStudio UDF...I'd have sworn that it had worked in my Firefox UIs previously.