I have a VB6/VBA procedure that takes a SQL and produces the table that was
altered by that SQL.
I think it works with any SQL, but not sure if is of any help to you.

RBS

On Sat, Oct 28, 2017 at 1:44 PM, Shane Dev <devshan...@gmail.com> wrote:

> Hello,
>
> Let's say I have a table containing of SQL statements, for example
>
> sqlite> .schema sql
> CREATE TABLE sql(statement text);
>
> sqlite> select * from sql;
> insert into tab1 select 'example text';
> update tab2 set col2 = 123 where col2 = 1;
> delete from tab3 where col1 = 2;
>
> For the first row, I could build a query using instr and substr functions
> to extract the first word after INSERT INTO. That would work for most
> simple INSERT statements, but it would fail if (for example) the statement
> was prepended with a WITH clause which happened to contain the text "INSERT
> INTO". Is there more generalized way of achieving this?
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to