Sign Up |  Live StatsLive Stats    Articles 35,345| Comments 159,792| Members 17,821, Newest cdotkhn| Online 267
Home Contact
 (Forgotten?): 
    Sikhism

   
                                                                     Your Banner Here!    

Re: Step 5 problem

Our Donation Goal : Why Donate? : Donate Today! : Donate Anonymously (ਗੁਪਤ) : Our Family of Supporters
Goal this month: 400 USD, Received: 35 USD (9%)
Please Donate...
Related Topics...
Thread Thread Starter Forum Replies Last Post
The Burqa Ban: Another Misguided Step Toward So-Called Equality Tejwant Singh Islam 5 13-Oct-2010 02:23 AM
Next Step in becoming a Sikh newsikhi New to Sikhism 2 04-Sep-2009 21:08 PM
Evaluate Value after each step in process BlakeD@ChoctawRecovery.com Information Technology 1 28-Jul-2006 08:17 AM
how about the next step? Vivian Information Technology 5 12-Nov-2005 22:39 PM
Sunnis Step Off Political Sidelines (washingtonpost.com) Sikh News Reporter Interfaith Dialogues 0 23-May-2005 05:13 AM


Tags
step, problem
Reply Post New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!
  #1 (permalink)  
Old 28-Jul-2006, 08:00 AM
'69 Camaro's Avatar '69 Camaro
Guest
 
Posts: n/a
   
   
Re: Step 5 problem

  Donate Today!   Email to Friend  Tell a Friend   Show Printable Version  Print   Contact sikhphilosophy.net Administraion for any Suggestions, Ideas, Feedback.  Feedback  

Register to Remove Advertisements
You're welcome. Glad you got it working.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/ex...ributors2.html for contact
info.


"BDP III" III@discussions.microsoft.com> wrote in message
news:098597A7-F36A-46A9-96E3-2558E9781E5E@microsoft.com...
> Thanks Gunny, I was able to figure this out and have accomplished this
> with a
> pretty good success rate, thank Tom again for me.
>
> Barry
>
> "'69 Camaro" wrote:
>
>> Hi, Barry.
>>
>> Tom probably won't be available until this evening, so he asked me to
>> step
>> in.
>>
>> > It should be updating every record, correct?

>>
>> Yes. It's quite possible that you have NULL's in the address2 column.
>> Ensure that you don't have any NULL values in any of the columns named in
>> the
>> JOIN clauses of the query. NULL's are never equal to any value. And
>> NULL's
>> aren't even equal to NULL. Also, ensure that the data in the columns for
>> each company in the tblCompanies table match with the corresponding
>> columns
>> in the Contacts table, i.e., no multiple spellings for the same thing.
>>
>> BTW, is the phone number for each company the same for all contacts? If
>> each contact within the same company has a different phone number, then
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/9220-re-step-5-problem.html
>> you'll want to save the phone number with the contact, not with the
>> company,
>> so you'd need to structure your tables a little differently if this is
>> the
>> case.
>>
>> HTH.
>> Gunny
>>
>> See http://www.QBuilt.com for all your database needs.
>> See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
>> http://www.Access.QBuilt.com/html/ex...ributors2.html for contact
>> info.
>>
>>
>> "BDP III" wrote:
>>
>> > Tom, I have made it almost to the end (after soem very tedious data
>> > correcting). I am having a problem with updating the fkCompanyID field
>> > in
>> > tblContacts when i run the query it only finds 317 records to update,
>> > however
>> > I have 10,323 records. It should be updating every record, correct?
>> > below
>> > is my actual SQL if you can help any it would be greatly appreciated.
>> >
>> > Barry
>> >
>> > "BDP III" wrote:
>> >
>> > > Found my error .. sorry and thanks again Tom.
>> > >
>> > > "BDP III" wrote:
>> > >
>> > > > Tom I am receiving a "sytax error in join operation" on this query
>> > > > (step 5 of
>> > > > your post). Can you see what I am doing wrong.
>> > > >
>> > > > UPDATE tblContacts INNER JOIN tblCompanies
>> > > > ON (tbl.Contacts.phone=tblCompanies.phone)
>> > > > AND (tbl.Contacts.Address1=tblCompanies.Address1)
>> > > > AND (tbl.Contacts.Address2=tblCompanies.Address2)
>> > > > AND (tbl.Contacts.City=tblCompanies.City)
>> > > > AND (tbl.Contacts.State=tblCompanies.State)
>> > > > AND (tbl.Contacts.Zip=tblCompanies.Zip)
>> > > > SET tbl.Contacts.fkCompanyID = tblCompanies.pkCompanyID
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=9220
>> > > >
>> > > > After I click ok on the error the "tbl" in tblContacts is
>> > > > highlighted as the
>> > > > error. Thanks again for your help on this.
>> > > >
>> > > > Barry
>> > > >
>> > > > "Tom Wickerath" wrote:
>> > > >
>> > > > > Here are some step-by-step instructions that you can try. Do this
>> > > > > on a copy
>> > > > > of your database.
>> > > > >
>> > > > > 1.) Create the following query:
>> > > > >
>> > > > > SELECT company, addy1, phone
>> > > > > FROM [tblContacts]
>> > > > > GROUP BY company, addy1, phone
>> > > > > ORDER BY company;
>> > > > >
>> > > > > Notes:
>> > > > > Use [tbl Contacts] in place of [tblContacts] if your contacts
>> > > > > table includes
>> > > > > a space in it's name.
>> > > > >
>> > > > > To use the SQL statement shown above, create a new query. Dismiss
>> > > > > the Add
>> > > > > Tables dialog without adding any tables. In query design view,
>> > > > > click on View
>> > > > > > SQL View. You should see the word SELECT highlighted. Copy the
>> > > > > > SQL
>> > > > > statement (Ctrl C) and paste it into the SQL view (Ctrl V),
>> > > > > replacing the
>> > > > > SELECT keyword. You can then switch back to the more familiar
>> > > > > design view, if
>> > > > > you wish, by clicking on View > Design View. Run the query.
>> > > > >
>> > > > > Scan the data to check for duplicate entries. You will end up
>> > > > > with duplicate
>> > > > > entries if the data in the company, addy1 and phone fields is not
>> > > > > identical
>> > > > > for a given company record. For example, an address might be
>> > > > > entered as "123
>> > > > > a st" in one record, "123 a st." (with a period) in another
>> > > > > record, and "123
>> > > > > a street" in a third record. These entries, along with company
>> > > > > names and/or
>> > > > > phone numbers that are not exactly the same will result in
>> > > > > individual records
>> > > > > in the above query. Make any necessary corrections to your data,
>> > > > > so that you
>> > > > > can run this query and produce unique records for each company.
>> > > > >
>> > > > > 2.) Create the following Make-Table query:
>> > > > >
>> > > > > SELECT company, addy1, phone
>> > > > > INTO tblCompanies
>> > > > > FROM [tblContacts]
>> > > > > GROUP BY company, addy1, phone
>> > > > > ORDER BY company
>> > > > >
>> > > > > 3.) Open your new tblCompanies table in design view. Add a new
>> > > > > primary key
>> > > > > field. My recommendation is to name it pkCompanyID and to use an
>> > > > > autonumber
>> > > > > data type.
>> > > > >
>> > > > > 4.) Open your existing contacts table in design view. Add a
>> > > > > matching foreign
>> > > > > key field to this table. If you used an autonumber data type for
>> > > > > your primary
>> > > > > key, then pick Number / Long Integer as the data type for this
>> > > > > new foreign
>> > > > > key field. Name it something like fkCompanyID. Also, I recommend
>> > > > > removing the
>> > > > > default value of 0 for numeric fields.
>> > > > >
>> > > > > 5.) Create the following update query to populate the values in
>> > > > > your new
>> > > > > foreign key field:
>> > > > >
>> > > > > UPDATE tblContacts INNER JOIN tblCompanies
>> > > > > ON (tblContacts.phone = tblCompanies.phone)
>> > > > > AND (tblContacts.addy1 = tblCompanies.addy1)
>> > > > > AND (tblContacts.company = tblCompanies.company)
>> > > > > SET tblContacts.fkCompanyID = tblCompanies.pkCompanyID
>> > > > >
>> > > > >
>> > > > > 6.) Open tblContacts in design view. Delete the company, addy1
>> > > > > and phone
>> > > > > fields. Save your changes and close the table.
>> > > > >
>> > > > > 7.) Click on Tools > Relationships. Add both tables to the
>> > > > > relationships
>> > > > > view (unless you already had your contacts table added). Create a
>> > > > > relationship with Enforce Referential Integrity checked as an
>> > > > > option. You
>> > > > > should not need the Cascade Update option if you used an
>> > > > > autonumber data type
>> > > > > for the primary key in tblCompanies. I do not recommend including
>> > > > > Cascade
>> > > > > Delete. This is a dangerous option. To create the relationship,
>> > > > > select and
>> > > > > drag pkCompanyID and drop it on top of fkCompanyID. Close the
>> > > > > relationships
>> > > > > view and save changes.
>> > > > >
>> > > > > Hope this helps.
>> > > > >
>> > > > >
>> > > > > Tom Wickerath, Microsoft Access MVP
>> > > > >
>> > > > > http://www.access.qbuilt.com/html/ex...tributors.html
>> > > > > http://www.access.qbuilt.com/html/search.html
>> > > > > __________________________________________
>> > > > >
>> > > > > "BDP III" wrote:
>> > > > >
>> > > > > > I have a table of industry contact information for locations
>> > > > > > across the
>> > > > > > county many records are duplicate company names which have a
>> > > > > > different
>> > > > > > contact name. I would like to make a primary table with
>> > > > > > company contact
>> > > > > > information with a related table with the individual names from
>> > > > > > each
>> > > > > > location. Is there a way to accomplish this through a query or
>> > > > > > two?
>> > > > > >
>> > > > > > this is a sample of what I have to start
>> > > > > > tbl contacts: (* primary key)
>> > > > > > *ID company addy1 phone firstname
>> > > > > > lastname
>> > > > > > 001 ABC Inc. 123 a st. 123-4567 Joe
>> > > > > > Doe
>> > > > > > 002 ABC Inc. 123 a st. 123-4567 Jane
>> > > > > > Doe
>> > > > > > 003 ABC Inc. 123 a st. 123-4567 John
>> > > > > > Deer
>> > > > > >
>> > > > > > What I need is a table with the company info as records and a
>> > > > > > linked table
>> > > > > > with contact names for each company. There may be duplicated
>> > > > > > company names
>> > > > > > in different states so I am not sure how make sure the info is
>> > > > > > link to each
>> > > > > > company since the primary keys are different for each record.
>> > > > > >
>> > > > > > Any suggestions would be appreciated








 
Do share your immediate thoughts or reactions on this issue? We value your views! Login Now! or Sign Up Today! to share your views with us.. Gurfateh!
Reply With Quote
Sponsored Links
   Click Here to Donate Now!

Support Us!
Become a Promoter!
Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh!
ReplyPost New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!

Bookmarks


(View-All Members who have read this thread : 0
There are no names to display.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Tools Search
Search:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

» Gurbani Jukebox
Listen to Gurbani while surfing SPN!
» Active Discussions
sikhism need urgent advice.......
Today 10:41 AM
8 Replies, 87 Views
sikhism Who is "Mohan"?
Today 08:46 AM
22 Replies, 348 Views
sikhism How important is Matha...
Today 08:12 AM
59 Replies, 1,041 Views
sikhism ਨਾਮਾ
Today 06:37 AM
2 Replies, 53 Views
sikhism Sikh Diamonds Video...
Today 04:23 AM
6 Replies, 120 Views
sikhism Are Creator and Creation...
Today 01:30 AM
44 Replies, 2,837 Views
sikhism Herman Hesse,...
Today 00:54 AM
13 Replies, 230 Views
sikhism On a Scale of Most...
Yesterday 21:42 PM
30 Replies, 1,277 Views
sikhism I became victim by...
Yesterday 19:50 PM
0 Replies, 46 Views
sikhism Sikh Books downloads
Yesterday 15:39 PM
2 Replies, 66 Views
sikhism Salok Sheikh Farid ji...
Yesterday 09:35 AM
0 Replies, 47 Views
sikhism In Punjab, three farmers...
Yesterday 05:36 AM
0 Replies, 49 Views
sikhism Supernatural Sikhs, what...
Yesterday 03:45 AM
19 Replies, 416 Views
sikhism Sukhmani Sahib Astpadi...
26-May-2012 22:57 PM
0 Replies, 51 Views
Do You Think You Are...
26-May-2012 09:59 AM
94 Replies, 8,258 Views
» Books You Should Read...
Powered by vBadvanced CMPS v3.2.2

All times are GMT +6.5. The time now is 10:52 AM.
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.5.2 Copyright © 2004-12, All Rights Reserved. Sikh Philosophy Network


Page generated in 0.51472 seconds with 30 queries