Results 1 to 11 of 11

Thread: [RESOLVED] Is there a way to combine 2 Deiffrent tables that holds the same NAme in the Table?

  1. #1

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    Resolved [RESOLVED] Is there a way to combine 2 Deiffrent tables that holds the same NAme in the Table?

    hey
    i have 2 tables in My DB
    1) is called Event
    2)is called YomanArc
    now those 2 tables contains the same information
    is there a way to to count the ID of both of them to 1 ?
    i mean to count them together and fields
    E.X

    in Event Table i have a a field Called Bags
    in the YomanArc table i have the same field called Bags but the name of the id is diffrent
    i want to count both of the ID's that are in diffrent tables too 1
    Code:
    Table NAme is Event 
    fields EventID,ItemsNew
    Table Name  YomanArc 
    Fields ID , ItemsOld
    tnx for any help
    salsa

  2. #2
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,176

    Re: Is there a way to combine 2 Deiffrent tables that holds the same NAme in the Tab

    What you said and what you showed in the code block is not the same....where are the bags fields?
    Before we try to assist, however, tell us WHY you want to this...what are you trying to retrieve from the tables and why.

  3. #3
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: Is there a way to combine 2 Deiffrent tables that holds the same NAme in the Tab

    I have absolutely no idea what to make of the OP
    is there a way to to count the ID of both of them to 1 ?
    i want to count both of the ID's that are in diffrent tables too 1
    What in the world does that mean?????

    From what you showed in the code window neither table has a field called bags but you said
    in Event Table i have a a field Called Bags
    in the YomanArc table i have the same field called Bags but the name of the id is diffrent
    But to count to one is pretty easy you just go

    1

    and you are done

  4. #4
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: Is there a way to combine 2 Deiffrent tables that holds the same NAme in the Tab

    Perhaps what you are asking is "Is there a way to join the data from both tables as one record based on the ID?" If so then the answer is yes but you really need to work on how you try to phrase your questions.

    http://www.w3schools.com/sql/sql_join.asp
    Last edited by DataMiser; Oct 6th, 2015 at 07:46 PM.

  5. #5

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    Re: Is there a way to combine 2 Deiffrent tables that holds the same NAme in the Tab

    Quote Originally Posted by datamiser View Post
    perhaps what you are asking is "is there a way to join the data from both tables as one record based on the id?" if so then the answer is yes but you really need to work on how you try to phrase your questions.

    http://www.w3schools.com/sql/sql_join.asp
    yes sir

  6. #6

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    Re: Is there a way to combine 2 Deiffrent tables that holds the same NAme in the Tab

    i didnt understand that sir
    i know what is inner join but i cant get it together
    i want to count all the EventID in Event Table
    which Location is the name of the field

    and to count all the ID in YomanArc table
    which CalTreatment is the name of the field and bind them together

  7. #7
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,176

    Re: Is there a way to combine 2 Deiffrent tables that holds the same NAme in the Tab

    This question is better suited for the database development forum.

  8. #8
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: Is there a way to combine 2 Deiffrent tables that holds the same NAme in the Tab

    Quote Originally Posted by salsa31 View Post
    i didnt understand that sir
    i know what is inner join but i cant get it together
    i want to count all the EventID in Event Table
    which Location is the name of the field

    and to count all the ID in YomanArc table
    which CalTreatment is the name of the field and bind them together
    So again you say count.. is that what you really mean? Do you want to know how many records are there or do you mean something else?
    Try again to explain what you are trying to do and pick your words carefully to avoid to confusion.

    And yes as Sam says this is a question that should be in the database section

  9. #9

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    Re: Is there a way to combine 2 Deiffrent tables that holds the same NAme in the Tab

    So again you say count.. is that what you really mean? Do you want to know how many records are there ?
    yes sir

  10. #10
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: Is there a way to combine 2 Deiffrent tables that holds the same NAme in the Tab

    Quote Originally Posted by salsa31 View Post
    yes sir
    Yes sir is not actually any kind of an explanation. You need to be clear what it is you are trying to do. I don't have time to keep asking questions in order to get you to state clearly what you want to do. Take your time and carefully describe what you want to do, give details and try to choose your words as to avoid confusion in the meaning.

    At this point I have no idea what it is you really want from your data and I am not going to try to guess any longer.

  11. #11

    Thread Starter
    Enjoy the moment
    Join Date
    Feb 2011
    Location
    Barrio Del pilar madrid spain
    Posts
    5,204

    Re: Is there a way to combine 2 Deiffrent tables that holds the same NAme in the Tab

    i meant to do Union but i figured it out
    tnx

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width