Discussion:
[Liquibase-user] New Topic: Imbedded & and tag characters (<) in data in sql statement
LiquiBase Community Forum
2009-06-11 17:00:40 UTC
Permalink
A new topic, 'Imbedded & and tag characters (<) in data in sql statement', has been made on a board you are watching.

You can see it at
http://liquibase.org/forum/index.php?topic=46.new#new

The text of the topic is shown below:

This does not work: <sql>INSERT INTO my_table (my_column) VALUES ('XXX<A bbb>$$&ddddd')</sql>

If I add SET ESC and change the & to & it still fails.

Any ideas about how I get that '&' in?

I expect the <A bbb> will also fail, since Eclipse is highlighting it as a problem.

Unsubscribe to new topics from this board by clicking here: http://liquibase.org/forum/index.php?action=notifyboard;board=1.0

Regards,
The LiquiBase Community Forum Team.
Paul Keeble
2009-06-11 20:31:40 UTC
Permalink
This is an XML issue, its worth learning how to represent special characters in XML statements (or use sqlfile). The following conversions will do the job:
Ampersand—&—&amp;
greater-than—>—&gt;
less-than—<—&lt;
apostrophe—'—&apos;
quote—"—&quot;



----- Original Message ----
From: LiquiBase Community Forum <***@voxland.net>
To: Liquibase-***@lists.sourceforge.net
Sent: Thursday, 11 June, 2009 18:00:40
Subject: [Liquibase-user] New Topic: Imbedded & and tag characters (<) in data in sql statement

A new topic, 'Imbedded & and tag characters (<) in data in sql statement', has been made on a board you are watching.

You can see it at
http://liquibase.org/forum/index.php?topic=46.new#new

The text of the topic is shown below:

This does not work: <sql>INSERT INTO my_table (my_column) VALUES ('XXX<A bbb>$$&ddddd')</sql>

If I add SET ESC and change the & to & it still fails.

Any ideas about how I get that '&' in?

I expect the <A bbb> will also fail, since Eclipse is highlighting it as a problem.

Unsubscribe to new topics from this board by clicking here: http://liquibase.org/forum/index.php?action=notifyboard;board=1.0

Regards,
The LiquiBase Community Forum Team.
Paul Keeble
2009-06-11 20:31:40 UTC
Permalink
This is an XML issue, its worth learning how to represent special characters in XML statements (or use sqlfile). The following conversions will do the job:
Ampersand—&—&amp;
greater-than—>—&gt;
less-than—<—&lt;
apostrophe—'—&apos;
quote—"—&quot;



----- Original Message ----
From: LiquiBase Community Forum <***@voxland.net>
To: Liquibase-***@lists.sourceforge.net
Sent: Thursday, 11 June, 2009 18:00:40
Subject: [Liquibase-user] New Topic: Imbedded & and tag characters (<) in data in sql statement

A new topic, 'Imbedded & and tag characters (<) in data in sql statement', has been made on a board you are watching.

You can see it at
http://liquibase.org/forum/index.php?topic=46.new#new

The text of the topic is shown below:

This does not work: <sql>INSERT INTO my_table (my_column) VALUES ('XXX<A bbb>$$&ddddd')</sql>

If I add SET ESC and change the & to & it still fails.

Any ideas about how I get that '&' in?

I expect the <A bbb> will also fail, since Eclipse is highlighting it as a problem.

Unsubscribe to new topics from this board by clicking here: http://liquibase.org/forum/index.php?action=notifyboard;board=1.0

Regards,
The LiquiBase Community Forum Team.

Loading...