Thread: Simple Access Help.. null values
-
September 1st, 2005, 12:59 PM #1Junior Member
- Join Date
- Sep 2005
- Posts
- 2
Simple Access Help.. null values
Sorry if I'm repeating other questions, I searched your boards and didn't come up with anything.
I have (what I think) is a pretty simple question...
In Access.. I'm trying to query from two tables at once.
Example: TableNames and TableCity
Not all records listed in TableNames are accounted for in TableCity.
Say Names has 100 records, and City only has 50. Is there a way to query both, and have the City show up as null/blank if there is no association with the Names table?
Please let me know if you have the time. Thanks!!
-
September 1st, 2005, 01:36 PM #2
Welcome to the TechIMO forums.
Are the TNames and TCity tables part of the same database or different databases? If part of the same database, then this may be a case of "over normalization". When storage space was at a premium, very fine normalization might have been justified. That is no longer the case.
. How do the records in TNames relate to the records in TCity, or is there no detectable relationship? If there is some sort of relationship, create a linking table based on the relationship.
. Perhaps the data entry forms or scripts were not designed correctly. If there is a relationship, the data entry method should have included that - with the City table as a lookup or something when entering the info into the Names table.
.bh.
Last edited by zepper; September 1st, 2005 at 01:52 PM.
"Our freedom depends on five boxes: soap, ballot, jury, witness; and, when all else fails, Ammo. " ?author?
-
September 1st, 2005, 01:49 PM #3Junior Member
- Join Date
- Sep 2005
- Posts
- 2
Same database.
Here's the short story..
I have a large database with a bunch of people in it.. and each individual is assigned a NameID.
There are a bunch of other tables too.. using TCity as an example.. in there is a list of Citys, and each is assigned a CityID.
The main table has a field for CityID, which is related to the TCity table.
I can query the main table for the "CityID", but that just spits out a bunch of unusable numbers. The actual names of the cities which relate to the ID are in the TCity table, and when I use that to query the names it limits the outcome to only the individuals in the TCity table.
Example:
(in the names table)
Name CityID
John 4353456
Dave 232452
Sue (null)
If I query using both the tables (So I can see "New York" as opposed to 4353456).. all I get are the first two names because there is no value associated with Sue.
I hope I made sense. Thanks for the quick reply!!!
-
September 1st, 2005, 06:42 PM #4
If value="" (null) then use "Not Available".
You get the idea, but you'll have to find out the way Access does it. There are forums out there specifically for Access and I think a specific section on the Tek-Tips site.
.bh."Our freedom depends on five boxes: soap, ballot, jury, witness; and, when all else fails, Ammo. " ?author?
-
September 2nd, 2005, 03:41 AM #5try this query:
Originally Posted by Roccapriore
"SELECT a.Name, b.CityID
FROM TableNames a
LEFT JOIN TableCities b
ON a.CityID = b.CityID"
hope this helps.keep 'em comin...
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Access VBA - Don't want form to close if null
By MushMouse in forum Technical SupportReplies: 4Last Post: August 11th, 2009, 09:43 AM -
VB Help with Void Null
By redfoxstorm in forum Webmastering and ProgrammingReplies: 37Last Post: April 16th, 2005, 12:31 AM -
MS Access: Passing values from a form to a parameter query
By NoLimit in forum Webmastering and ProgrammingReplies: 5Last Post: December 15th, 2003, 06:12 PM -
"Failed to enable constraints. One or more rows contain values violating non-null, un
By gicio in forum Webmastering and ProgrammingReplies: 0Last Post: March 3rd, 2003, 03:56 PM -
redhat null: anyone know about it?
By storm2k in forum Applications and Operating SystemsReplies: 3Last Post: August 24th, 2002, 12:55 PM



LinkBack URL
About LinkBacks



Reply With Quote

watch epic online Scary Pic Screenwriters Jason Friedberg And Aaron Seltzer Work To Parody The "Biggest" Movies Ever To Hit The Silver Screen During This Comedy That Offers Such Fashionable...
watch epic online free