J
Jan Biel
Hi there!
I'm looking for a regular expression or a set of expressions able to cut
Postgres (or any SQL) code into its syntactical parts.
For example if the code was
CREATE TABLE table_a (
attrib_a varchar(8) NOT NULL,
attrib_b varchar(10)
);
I need to extract the components like this:
CREATE TABLE
table_a
---
attib_a
varchar(8)
NOT NULL
---
attrib_b
varchar(10)
---
This is only a simplified example, since SQL code can be much more complex.
I was hoping there are given regular expressions so I wouldn't have to do
all the work by myself (which I'm not sure I'm able to).
Postgres would be awesome, but any SQL version would do since I could
translate the expressions rather easily, I guess.
Thanks in advance on any help towards the matter
Janbiel
I'm looking for a regular expression or a set of expressions able to cut
Postgres (or any SQL) code into its syntactical parts.
For example if the code was
CREATE TABLE table_a (
attrib_a varchar(8) NOT NULL,
attrib_b varchar(10)
);
I need to extract the components like this:
CREATE TABLE
table_a
---
attib_a
varchar(8)
NOT NULL
---
attrib_b
varchar(10)
---
This is only a simplified example, since SQL code can be much more complex.
I was hoping there are given regular expressions so I wouldn't have to do
all the work by myself (which I'm not sure I'm able to).
Postgres would be awesome, but any SQL version would do since I could
translate the expressions rather easily, I guess.
Thanks in advance on any help towards the matter
Janbiel