A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

DB query - Compare 2 colums in 2 tables - result = numbers not be.



 
 
Thread Tools Display Modes
  #1  
Old April 4th, 2005, 04:17 PM
DB Queen (Not)
external usenet poster
 
Posts: n/a
Default DB query - Compare 2 colums in 2 tables - result = numbers not be.

I just want to draw out the numbers in my database that are not being used so
that they can go in a separate query or table so they can be reused.
Anyone any ideas how to program this??

Thanks
  #2  
Old April 4th, 2005, 05:10 PM
John Vinson
external usenet poster
 
Posts: n/a
Default

On Mon, 4 Apr 2005 08:17:02 -0700, "DB Queen (Not)" DB Queen
wrote:

I just want to draw out the numbers in my database that are not being used so
that they can go in a separate query or table so they can be reused.
Anyone any ideas how to program this??

Thanks


If the number is a Long Integer, then there are 4294967296 possible
values, most of which are probably not being used. Could you explain
what you mean by "the numbers in my database" and what constitutes
being "used"?

John W. Vinson[MVP]
  #3  
Old April 4th, 2005, 06:59 PM
Pat Hartman
external usenet poster
 
Posts: n/a
Default

Use a Left Join instead of an Inner join and add selection criteria that
selects rows where the primary key on the right side table is null:

Select tblA.* From tblA Left Join tblB on tblA.Fld1 = tblB.Fld1
Where tblB.Fld1 Is Null;

You can use the unmatched query wizard to build this query for you.

"DB Queen (Not)" DB Queen wrote in message
...
I just want to draw out the numbers in my database that are not being used

so
that they can go in a separate query or table so they can be reused.
Anyone any ideas how to program this??

Thanks



  #4  
Old April 5th, 2005, 01:51 PM
DB Queen (Not)
external usenet poster
 
Posts: n/a
Default

I have files numbered 1-100 say with names and addresses etc also in the
record. Sometimes these details need to be archived but the number remains
in the database for re - use. In female terms I want to say if column b-g is
blank then column a copy to query 1. (if that makes sense??) Thanks guys!

"Pat Hartman" wrote:

Use a Left Join instead of an Inner join and add selection criteria that
selects rows where the primary key on the right side table is null:

Select tblA.* From tblA Left Join tblB on tblA.Fld1 = tblB.Fld1
Where tblB.Fld1 Is Null;

You can use the unmatched query wizard to build this query for you.

"DB Queen (Not)" DB Queen wrote in message
...
I just want to draw out the numbers in my database that are not being used

so
that they can go in a separate query or table so they can be reused.
Anyone any ideas how to program this??

Thanks




  #5  
Old April 5th, 2005, 02:57 PM
Jeff Boyce
external usenet poster
 
Posts: n/a
Default

We're not there, and can't see your database design unless you describe it
to us.

We may have a different meaning than you do for "files numbered 1-100" ...
what do you mean?

Why do you feel it is necessary to "archive" (and what do YOU mean by that)
some of the "details" (do you mean a person's name can be a "detail"?)?

What "number"? What are you referring to when you say "the number remains
in the database for re-use" (and what does "re-use" mean to you)?

In Access, you don't copy a column (?field) to a query. You can create a
query that displays a column (or updates).

--
More info, please ...

Jeff Boyce
Access MVP

"DB Queen (Not)" DB Queen wrote in message
...
I have files numbered 1-100 say with names and addresses etc also in the
record. Sometimes these details need to be archived but the number

remains
in the database for re - use. In female terms I want to say if column b-g

is
blank then column a copy to query 1. (if that makes sense??) Thanks guys!

"Pat Hartman" wrote:

Use a Left Join instead of an Inner join and add selection criteria

that
selects rows where the primary key on the right side table is null:

Select tblA.* From tblA Left Join tblB on tblA.Fld1 = tblB.Fld1
Where tblB.Fld1 Is Null;

You can use the unmatched query wizard to build this query for you.

"DB Queen (Not)" DB Queen wrote in

message
...
I just want to draw out the numbers in my database that are not being

used
so
that they can go in a separate query or table so they can be reused.
Anyone any ideas how to program this??

Thanks





 




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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
query problem with linked SQL tables when importing to new mdb file Keith G Hicks Running & Setting Up Queries 2 March 22nd, 2005 09:44 PM
Conversion SVC Worksheet Functions 9 February 28th, 2005 02:29 PM
Moving from xBase/Clipper [email protected] New Users 1 February 3rd, 2005 07:25 PM
Newbie? Do I use Report or Query John Egan New Users 11 June 28th, 2004 08:31 PM
Display a query result in form Le Tran New Users 0 June 15th, 2004 09:08 PM


All times are GMT +1. The time now is 12:24 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.