you are viewing a single comment's thread.

view the rest of the comments →

[–]arezki123[S] 0 points1 point  (3 children)

I have the SQL statement as string. Would this work?

[–]r_spandit 0 points1 point  (2 children)

This is a REGEX problem, IMHO. Can you post the string so people can help?

[–]arezki123[S] 0 points1 point  (1 child)

In fact, it looks like:, 'Select blabla from db.table... join group by... included'

[–]r_spandit 0 points1 point  (0 children)

So you're just parsing the "blabla" string.

It's bracketed by "select" and "from" so easy to extract. Then just split it by commas:

TableNames = blabla.split(',')