You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Ashish Kulkarni <ku...@yahoo.com> on 2005/12/09 19:01:27 UTC
How to define not equal (<>) in SQL statement
Hi
I have a SQL statement as below, how do i define it in
xml
select * from mytable where mytest <> ' '
When i define it in xml file i get following error
The content beginning "<>" is not legal markup.
Perhaps the ">" (e;) character should be a letter.
Ashish
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Re: How to define not equal (<>) in SQL statement
Posted by Nathan Maves <Na...@Sun.COM>.
What database are you using?
Why not use != ?
If you can then I would use < and >
Nathan
On Dec 9, 2005, at 11:01 AM, Ashish Kulkarni wrote:
> Hi
> I have a SQL statement as below, how do i define it in
> xml
>
> select * from mytable where mytest <> ' '
>
> When i define it in xml file i get following error
>
> The content beginning "<>" is not legal markup.
> Perhaps the ">" (e;) character should be a letter.
>
>
> Ashish
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
Re: How to define not equal (<>) in SQL statement
Posted by Reuben Firmin <re...@cnet.com>.
Use the CDATA construct, e.g.:
<![CDATA[
SELECT * FROM Deployment
WHERE environmentId = #environmentId#
AND deploymentTime <= #end#
AND deploymentTime >= #start#
ORDER BY deploymentTime DESC
]]>
Ashish Kulkarni wrote:
>Hi
>I have a SQL statement as below, how do i define it in
>xml
>
>select * from mytable where mytest <> ' '
>
>When i define it in xml file i get following error
>
>The content beginning "<>" is not legal markup.
>Perhaps the ">" (e;) character should be a letter.
>
>
>Ashish
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam? Yahoo! Mail has the best spam protection around
>http://mail.yahoo.com
>
>
Re: How to define not equal (<>) in SQL statement
Posted by Jeff Butler <je...@gmail.com>.
Sorry for the wierd format this is better:
select * from mytable where mytest <![CDATA[ <> ]]> ' '
Jeff Butler
On 12/9/05, Jeff Butler <je...@gmail.com> wrote:
>
> Put it in a cdata section like this:
>
>
> select * from mytable where mytest <![CDATA[
> <> ]]> ' 'Jeff Butler
>
>
> On 12/9/05, Ashish Kulkarni <ku...@yahoo.com> wrote:
> >
> > Hi
> > I have a SQL statement as below, how do i define it in
> > xml
> >
> > select * from mytable where mytest <> ' '
> >
> > When i define it in xml file i get following error
> >
> > The content beginning "<>" is not legal markup.
> > Perhaps the ">" (e;) character should be a letter.
> >
> >
> > Ashish
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> >
>
>
Re: How to define not equal (<>) in SQL statement
Posted by Jeff Butler <je...@gmail.com>.
Put it in a cdata section like this:
select * from mytable where mytest <![CDATA[ <> ]]> ' '
Jeff Butler
On 12/9/05, Ashish Kulkarni <ku...@yahoo.com> wrote:
>
> Hi
> I have a SQL statement as below, how do i define it in
> xml
>
> select * from mytable where mytest <> ' '
>
> When i define it in xml file i get following error
>
> The content beginning "<>" is not legal markup.
> Perhaps the ">" (e;) character should be a letter.
>
>
> Ashish
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>