4 Replies Latest reply on Jun 24, 2015 9:35 AM by Shirley Dunbar

    Table Join

    James Stout

      I am having difficulties performing a table join Customer number to customer number in another table. Most all the records do have at least one match in the table to be joined.

      These are tables not feature classes.

        • Re: Table Join
          Shirley Dunbar

          hi James

          I'm assuming you are doing this join in ArcMap?  what symptoms are you seeing? ie.  can you get to the related table but dont see the field you want to join?  do you not see the table you want to related to?

          a couple of things come to mind: 

          1.  are the field types compatible/matching? 

          2.  (yes, I've seen this before...) Make sure there isnt an already existing relationship between those fields.

            • Re: Table Join
              James Stout

              Field types are compatible, text fields.

              There is no relationship between those fields.

               

              I have tried table join and field join.

              Table join gives me a no matching record error this is not true.

              field join gives me empty fields. Once failed I take them back out.

               

              I am trying to join table 2 numbers to table 1 numbers.

               

              James E. Stout (Drafting, Mapping)

              Elizabethton Electric Department

              jstout@cityofelizabethton.org

              Phone: (423) 547-8632

              Cell: (423) 342-0164

              Fax: (423) 542-1108

                • Re: Table Join
                  Shirley Dunbar

                  I had a client who was joining 2 text fields that contained numbers and it turned out one of their fields contained leading zeros, which of course you cant see.  Here is a select statement (alter as needed) you can run that will (in effect) perform the join and cast the text field as numbers first.  If you need to, cast both fields.  if you get a count that you expect, then you know you have zeros in your text field.

                  select count(objectid) from SERVICEACCOUNT as SA, SERVICEACCOUNTCOPY as SAC where SAC.Premisenumber=CAST(CAST(SA.premisenumber as INTEGER) AS VARCHAR));

                  to delete:

                  UPDATE table SET column=LTRIM(column,'0');

                  hopefully this is the issue.  let me know what you find