1
Vote

"SELECT INTO statement is not supported": regex pattern match issue

description

If an SQL statement uses a CTE that contains an MERGE/INSERT INTO clause the regex fails. Using SQLAzureMW 3.8.6 with the pattern "SELECT[\w\W][^;]*\sINTO" against a statement such as ";WITH cte AS (SELECT col1 FROM tab1) MERGE INTO tab2 USING . . . " causes a false positive match for the "SELECT INTO statement is not supported" condition.

comments

ghuey wrote Apr 24, 2012 at 5:07 PM

Hi Andy,

Another good catch. I will work on the regex pattern and fix.

Thanks again,
George

ghuey wrote Apr 24, 2012 at 11:06 PM

Ok, added MERGE to the NotSubStr section. It should work in v3.8.7.

Regards,
George

kpfaulkner wrote May 26 at 7:19 AM

I can confirm that this is still being triggered in version 4.0.18.

A comment with the word "into" within the body of the select statement triggered this. Now that was fun to figure out :)

Enjoy...

Ken

ghuey wrote May 26 at 4:30 PM

Hi Ken,

Can you send me an example so I can fix?

Thanks,
George