in reply to Re^2: Regex: Identifying comments
in thread Regex: Identifying comments
Thanks for reply, pvaldes.
I noticed I misunderstood how to escape single quotes in sql. I thought of the case like this
And this is nothing surprise.insert into foo (bar,boo) values('''a', 'b');
I changed test data with real SQL with your advice. SQLite and Postgres accept these commands.select '--foo';
So far, so good.drop table foo; create table foo( --tabel foo bar text, --fld name boo text --again ); --populate insert into foo (bar,boo) values('''a', 'b'); -- insert quote's sake insert into foo (bar,boo) values('c', 'd'); -- another line select 'test' || 'abc' as a ; -- maybe you use dual wi +th oracle? select 'test''s' || 'abc' as a ; -- maybe you use dual wi +th oracle? select '--foo';
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Regex: Identifying comments
by pvaldes (Chaplain) on Aug 30, 2012 at 23:42 UTC | |
by remiah (Hermit) on Aug 31, 2012 at 05:37 UTC | |
by pvaldes (Chaplain) on Aug 31, 2012 at 15:32 UTC | |
by hbm (Hermit) on Sep 01, 2012 at 14:49 UTC | |
by Anonymous Monk on Sep 01, 2012 at 15:38 UTC |