How to define not equal (<>) in SQL statement

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How to define not equal (<>) in SQL statement

Ashish Kulkarni
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 ">" (&#3e;) character should be a letter.


Ashish

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 
Reply | Threaded
Open this post in threaded view
|

Re: How to define not equal (<>) in SQL statement

Jeff Butler-2
Put it in a cdata section like this:
 

select * from mytable where mytest <![CDATA[

<> ]]> ' 'Jeff Butler

 
On 12/9/05, Ashish Kulkarni <[hidden email]> 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 ">" (&#3e;) character should be a letter.


Ashish

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Reply | Threaded
Open this post in threaded view
|

Re: How to define not equal (<>) in SQL statement

Nathan Maves
In reply to this post by Ashish Kulkarni
What database are you using?

Why not use != ?

If you can then I would use &lt; and &gt;

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 ">" (&#3e;) character should be a letter.
>
>
> Ashish
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com

Reply | Threaded
Open this post in threaded view
|

Re: How to define not equal (<>) in SQL statement

Reuben Firmin
In reply to this post by Ashish Kulkarni
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 ">" (&#3e;) character should be a letter.
>
>
>Ashish
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around
>http://mail.yahoo.com 
>  
>
Reply | Threaded
Open this post in threaded view
|

Re: How to define not equal (<>) in SQL statement

Jeff Butler-2
In reply to this post by Jeff Butler-2
Sorry for the wierd format this is better:
 
select * from mytable where mytest <![CDATA[ <> ]]> ' '
 
Jeff Butler
 

 
On 12/9/05, Jeff Butler <[hidden email]> wrote:
Put it in a cdata section like this:
 

select * from mytable where mytest <![CDATA[

<> ]]> ' 'Jeff Butler

 
On 12/9/05, Ashish Kulkarni <[hidden email]> 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 ">" (&#3e;) character should be a letter.


Ashish

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://mail.yahoo.com/" target="_blank"> http://mail.yahoo.com