dbTalk Databases Forums  

Query Data

comp.database.ms-access comp.database.ms-access


Discuss Query Data in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Reggie
 
Posts: n/a

Default Query Data - 05-17-2005 , 04:08 AM






Hi and TIA!
I have a recordset like so:

COG MCC
9G D
7R E
9N (null)
1R D
1R (null)
3R D
3R (null)
1N D
1N (null)
3N D
3N (null)
etc.....

What I want is to return all records except where COG is "1*" or "3*" and
MCC Is Not Null like so:

COG MCC
9G D
7R E
9N (null)
1R (null)
3R (null)
1N (null)
3N (null)
etc.....

I've tried every combination I can think of, but can't seem to achieve my
goal. This also needs to be an editable recordset returned. Any advice is
appreciated!



Reply With Quote
  #2  
Old   
Reggie
 
Posts: n/a

Default Re: Query Data - 05-17-2005 , 04:14 AM






Ooops! I said where MCC is not null below, but meant to say where MCC Is
Null!
"Reggie" <NoSpam_chief123101 (AT) NoSpam_yahoo (DOT) com> wrote

Quote:
Hi and TIA!
I have a recordset like so:

COG MCC
9G D
7R E
9N (null)
1R D
1R (null)
3R D
3R (null)
1N D
1N (null)
3N D
3N (null)
etc.....

What I want is to return all records except where COG is "1*" or "3*" and
MCC Is Not Null like so:

COG MCC
9G D
7R E
9N (null)
1R (null)
3R (null)
1N (null)
3N (null)
etc.....

I've tried every combination I can think of, but can't seem to achieve my
goal. This also needs to be an editable recordset returned. Any advice
is appreciated!




Reply With Quote
  #3  
Old   
Reggie
 
Posts: n/a

Default Re: Query Data - 05-17-2005 , 04:20 AM



I stand corrected again! My original post was correct. Really sorry about
this. It's 2am so I guess I should call it a night before I recall get
screwed-up. Thanks again for your patience.
"Reggie" <NoSpam_chief123101 (AT) NoSpam_yahoo (DOT) com> wrote

Quote:
Ooops! I said where MCC is not null below, but meant to say where MCC Is
Null!
"Reggie" <NoSpam_chief123101 (AT) NoSpam_yahoo (DOT) com> wrote in message
news:xO2dnadwTsLkKRTfRVn-rA (AT) comcast (DOT) com...
Hi and TIA!
I have a recordset like so:

COG MCC
9G D
7R E
9N (null)
1R D
1R (null)
3R D
3R (null)
1N D
1N (null)
3N D
3N (null)
etc.....

What I want is to return all records except where COG is "1*" or "3*" and
MCC Is Not Null like so:

COG MCC
9G D
7R E
9N (null)
1R (null)
3R (null)
1N (null)
3N (null)
etc.....

I've tried every combination I can think of, but can't seem to achieve my
goal. This also needs to be an editable recordset returned. Any advice
is appreciated!






Reply With Quote
  #4  
Old   
Ira Solomon
 
Posts: n/a

Default Re: Query Data - 05-17-2005 , 08:42 AM



Reggie

In the query criteria for COG is:
Not Like "1*" And Not Like "3*"

For MCC:

Not Is Null

This will do it.

Good Luck
Ira Solomon


On Tue, 17 May 2005 02:08:07 -0700, "Reggie"
<NoSpam_chief123101 (AT) NoSpam_yahoo (DOT) com> wrote:

Quote:
Hi and TIA!
I have a recordset like so:

COG MCC
9G D
7R E
9N (null)
1R D
1R (null)
3R D
3R (null)
1N D
1N (null)
3N D
3N (null)
etc.....

What I want is to return all records except where COG is "1*" or "3*" and
MCC Is Not Null like so:

COG MCC
9G D
7R E
9N (null)
1R (null)
3R (null)
1N (null)
3N (null)
etc.....

I've tried every combination I can think of, but can't seem to achieve my
goal. This also needs to be an editable recordset returned. Any advice is
appreciated!



Reply With Quote
  #5  
Old   
Reggie
 
Posts: n/a

Default Re: Query Data - 05-17-2005 , 02:56 PM



Ira, Thanks works great. I had to add OR MCC Is Null otherwise I didn't
get the COG's with a Null MCC.

SELECT [1_NC_Analysis].OS_COG, [1_NC_Analysis].OS_MCC
FROM 1_NC_Analysis
WHERE ((([1_NC_Analysis].OS_COG) Not Like "1*" And ([1_NC_Analysis].OS_COG)
Not Like "3*") AND (Not ([1_NC_Analysis].OS_MCC) Is Null)) OR
((([1_NC_Analysis].OS_MCC) Is Null))
ORDER BY [1_NC_Analysis].OS_COG;

Thanks again!!


"Ira Solomon" <isolomon (AT) solomonltd (DOT) com> wrote

Quote:
Reggie

In the query criteria for COG is:
Not Like "1*" And Not Like "3*"

For MCC:

Not Is Null

This will do it.

Good Luck
Ira Solomon


On Tue, 17 May 2005 02:08:07 -0700, "Reggie"
NoSpam_chief123101 (AT) NoSpam_yahoo (DOT) com> wrote:

Hi and TIA!
I have a recordset like so:

COG MCC
9G D
7R E
9N (null)
1R D
1R (null)
3R D
3R (null)
1N D
1N (null)
3N D
3N (null)
etc.....

What I want is to return all records except where COG is "1*" or "3*" and
MCC Is Not Null like so:

COG MCC
9G D
7R E
9N (null)
1R (null)
3R (null)
1N (null)
3N (null)
etc.....

I've tried every combination I can think of, but can't seem to achieve my
goal. This also needs to be an editable recordset returned. Any advice
is
appreciated!





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.