dolt icon indicating copy to clipboard operation
dolt copied to clipboard

Support `CREATE TABLE (...) AS SELECT`

Open bheni opened this issue 6 months ago • 0 comments

I am trying to use Dolt as the database for osticket, but there are queries that osticket runs that Dolt doesn't support. This is the one that is currently blocking me:

        CREATE TABLE IF NOT EXISTS `ost_user__cdata` (
            PRIMARY KEY (user_id)
        ) DEFAULT CHARSET=utf8 AS 
        SELECT 
            entry.`object_id` as `user_id`, 
            MAX(IF(field.id='1',coalesce(ans.value_id, ans.value),NULL)) as `email`
            FROM ost_form_entry entry 
            JOIN ost_form_entry_values ans 
            ON ans.entry_id = entry.id 
            JOIN ost_form_field field 
            ON field.id=ans.field_id 
            WHERE entry.object_type='U' GROUP BY entry.object_id

bheni avatar Jun 05 '25 23:06 bheni