Hi all,
I'm attempting to do something like the following SQL query:
SELECT * FROM `users` WHERE idusers != 3 | 2;
such as:
= "idusers <> 3OR 2";
But I get an error stating:
Cannot perform 'Or' operation on System.Int32 and System.Int32.
How can I use a range of values in such a statement as this? Any help
would be greatly appreciated.
Chris 5 1194
It should be
"idusers<> 3 OR idUsers <>2"
--
Swanand Mokashi
Microsoft Certified Solution Developer (.NET) - Early Achiever
Microsoft Certified Application Developer (.NET) http://www.dotnetgenerics.com/
DotNetGenerics.com -- anything and everything about Microsoft .NET
technology ... http://www.swanandmokashi.com/ http://www.swanandmokashi.com/HomePage/WebServices/
Home of the Stock Quotes, Quote of the day and Horoscope web services
<ch***********@gmail.com> wrote in message
news:11**********************@g10g2000cwb.googlegr oups.com... Hi all,
I'm attempting to do something like the following SQL query:
SELECT * FROM `users` WHERE idusers != 3 | 2;
such as:
= "idusers <> 3OR 2";
But I get an error stating:
Cannot perform 'Or' operation on System.Int32 and System.Int32.
How can I use a range of values in such a statement as this? Any help would be greatly appreciated.
Chris
I'm afraid you're both wrong. Whereas your syntax is correct, the logic is
incorrect. Let me explain: "idusers<> 3 OR idUsers <>2"
Let's say that idusers = 1. The statement returns true.
How about 2? The statement returns true because it is not equal to 3.
So, what about 3? The statement returns true because it is not equal to 2.
In other words, this filter is not a filter at all. It will return true for
all records.
Unfortunately, I can't tell what the actual condition is supposed to be, or
I would give the syntax for it.
--
HTH,
Kevin Spencer
Microsoft MVP
Professional Numbskull
Show me your certification without works,
and I'll show my certification
*by* my works.
"Swanand Mokashi" <sw***********@swanandmokashi.com> wrote in message
news:OG*************@TK2MSFTNGP05.phx.gbl... It should be "idusers<> 3 OR idUsers <>2"
-- Swanand Mokashi Microsoft Certified Solution Developer (.NET) - Early Achiever Microsoft Certified Application Developer (.NET)
http://www.dotnetgenerics.com/ DotNetGenerics.com -- anything and everything about Microsoft .NET technology ...
http://www.swanandmokashi.com/ http://www.swanandmokashi.com/HomePage/WebServices/ Home of the Stock Quotes, Quote of the day and Horoscope web services
<ch***********@gmail.com> wrote in message news:11**********************@g10g2000cwb.googlegr oups.com... Hi all,
I'm attempting to do something like the following SQL query:
SELECT * FROM `users` WHERE idusers != 3 | 2;
such as:
= "idusers <> 3OR 2";
But I get an error stating:
Cannot perform 'Or' operation on System.Int32 and System.Int32.
How can I use a range of values in such a statement as this? Any help would be greatly appreciated.
Chris
Yeah I thought of that -- but just replied with the filter syntax --
probably should have mentioned ;-)
--
Swanand Mokashi
Microsoft Certified Solution Developer (.NET) - Early Achiever
Microsoft Certified Application Developer (.NET) http://www.dotnetgenerics.com/
DotNetGenerics.com -- anything and everything about Microsoft .NET
technology ... http://www.swanandmokashi.com/ http://www.swanandmokashi.com/HomePage/WebServices/
Home of the Stock Quotes, Quote of the day and Horoscope web services
"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:ea**************@TK2MSFTNGP05.phx.gbl... I'm afraid you're both wrong. Whereas your syntax is correct, the logic is incorrect. Let me explain:
"idusers<> 3 OR idUsers <>2"
Let's say that idusers = 1. The statement returns true. How about 2? The statement returns true because it is not equal to 3. So, what about 3? The statement returns true because it is not equal to 2.
In other words, this filter is not a filter at all. It will return true for all records.
Unfortunately, I can't tell what the actual condition is supposed to be, or I would give the syntax for it.
-- HTH,
Kevin Spencer Microsoft MVP Professional Numbskull
Show me your certification without works, and I'll show my certification *by* my works.
"Swanand Mokashi" <sw***********@swanandmokashi.com> wrote in message news:OG*************@TK2MSFTNGP05.phx.gbl... It should be "idusers<> 3 OR idUsers <>2"
-- Swanand Mokashi Microsoft Certified Solution Developer (.NET) - Early Achiever Microsoft Certified Application Developer (.NET)
http://www.dotnetgenerics.com/ DotNetGenerics.com -- anything and everything about Microsoft .NET technology ...
http://www.swanandmokashi.com/ http://www.swanandmokashi.com/HomePage/WebServices/ Home of the Stock Quotes, Quote of the day and Horoscope web services
<ch***********@gmail.com> wrote in message news:11**********************@g10g2000cwb.googlegr oups.com... Hi all,
I'm attempting to do something like the following SQL query:
SELECT * FROM `users` WHERE idusers != 3 | 2;
such as:
= "idusers <> 3OR 2";
But I get an error stating:
Cannot perform 'Or' operation on System.Int32 and System.Int32.
How can I use a range of values in such a statement as this? Any help would be greatly appreciated.
Chris
Swanand Mokashi wrote: Yeah I thought of that -- but just replied with the filter syntax -- probably should have mentioned ;-)
-- Swanand Mokashi Microsoft Certified Solution Developer (.NET) - Early Achiever Microsoft Certified Application Developer (.NET)
http://www.dotnetgenerics.com/ DotNetGenerics.com -- anything and everything about Microsoft .NET technology ...
http://www.swanandmokashi.com/ http://www.swanandmokashi.com/HomePage/WebServices/ Home of the Stock Quotes, Quote of the day and Horoscope web services "Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message news:ea**************@TK2MSFTNGP05.phx.gbl... I'm afraid you're both wrong. Whereas your syntax is correct, the logic is incorrect. Let me explain:
"idusers<> 3 OR idUsers <>2"
Let's say that idusers = 1. The statement returns true. How about 2? The statement returns true because it is not equal to 3. So, what about 3? The statement returns true because it is not equal to 2.
In other words, this filter is not a filter at all. It will return true for all records.
Unfortunately, I can't tell what the actual condition is supposed to be, or I would give the syntax for it.
-- HTH,
Kevin Spencer Microsoft MVP Professional Numbskull
Show me your certification without works, and I'll show my certification *by* my works.
"Swanand Mokashi" <sw***********@swanandmokashi.com> wrote in message news:OG*************@TK2MSFTNGP05.phx.gbl... It should be "idusers<> 3 OR idUsers <>2"
-- Swanand Mokashi Microsoft Certified Solution Developer (.NET) - Early Achiever Microsoft Certified Application Developer (.NET)
http://www.dotnetgenerics.com/ DotNetGenerics.com -- anything and everything about Microsoft .NET technology ...
http://www.swanandmokashi.com/ http://www.swanandmokashi.com/HomePage/WebServices/ Home of the Stock Quotes, Quote of the day and Horoscope web services
<ch***********@gmail.com> wrote in message news:11**********************@g10g2000cwb.googlegr oups.com... Hi all,
I'm attempting to do something like the following SQL query:
SELECT * FROM `users` WHERE idusers != 3 | 2;
such as:
= "idusers <> 3OR 2";
But I get an error stating:
Cannot perform 'Or' operation on System.Int32 and System.Int32.
How can I use a range of values in such a statement as this? Any help would be greatly appreciated.
Chris
What i'm trying to do is show every record which doesn't match a
certain id. Ideally I want to manipulate the string holding the command
so Id's can be added based upon user selections.
Thanks,
Chris
> What i'm trying to do is show every record which doesn't match a certain id. Ideally I want to manipulate the string holding the command so Id's can be added based upon user selections.
In that case, you would use AND rather than OR.
--
HTH,
Kevin Spencer
Microsoft MVP
Professional Numbskull
Show me your certification without works,
and I'll show my certification
*by* my works.
What i'm trying to do is show every record which doesn't match a certain id. Ideally I want to manipulate the string holding the command so Id's can be added based upon user selections.
Thanks,
Chris This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: vbnetrookie |
last post by:
In the dataview rowfilter property, how can I say that I just want
Titles that start with 'A' to 'J' ??
ex:
dv.rowfilter = " Country = ' France ' "
I want
dv.rowfilter = " Title = (from...
|
by: Ryan Moore |
last post by:
I have a dataset (called adset) which has a column called "Large" which is
either an integer 0 or 1.
I am creating 2 dataviews, one which should display the 1's and one which
should display the...
|
by: Dave Hagerich |
last post by:
I'm using a DataGrid with a DataSet and I'm trying to filter the data being
displayed, using the following code as a test:
DataView theView = new DataView(theDataSet.Tables);
theView.RowFilter =...
|
by: Roy Lawson |
last post by:
Can anyone explain the difference between RowStateFilter
and RowFilter properties of the DataView objects in simple
terms?
I am going through a Transcender practice exam and just
when I think I...
|
by: Marty McFly |
last post by:
Greetings,
I'm trying to let my users dynamically filter records from a table that
relate to other tables.
RELATIONSHIPS:
. = .
. = .
There is a Many-to-Many relationship between...
|
by: KC |
last post by:
For a DataView.Rowfilter can I use more than one expression? I want to
filter out two different things.
For example can I take:
dv.RowFilter = "MTX <> 'Customer Forcast'"
and
...
|
by: neeraj |
last post by:
Hi, all
Could anny one give me help how can I use like operator with these data
types "integer , datetime or boolean" in DataView.RowFilter
Actually when I try to get the data from dataview...
|
by: neeraj |
last post by:
Hi, all
Could anny one give me help how can I use like operator with these data
types "integer , datetime or boolean" in DataView.RowFilter
Actually when I try to get the data from dataview...
|
by: AlexW |
last post by:
Hi
I am in the process of developing an inventory application in visual basic. I keep coming up against a problem with using the dataview.rowfilter property.
Basically what happens is this:
-a...
|
by: AlexW |
last post by:
Hi
I am in the process of developing an inventory application in visual basic. I keep coming up against a problem with using the dataview.rowfilter property.
Basically what happens is this:
-a...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |