Jump to content

novedturn

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Everything posted by novedturn

  1. Does this help? Current Table Has The Following Records: ID Name Codes 1 John D S12, S13, S89 1 John D S98, T12 2 Joe D X27, S28 3 Bob S F12, F13, X43 3 Bob S S44, X38, S90 4 Steve F D25 I want a query that will return the following ID Name Codes 1 John D S12, S13, S89, S98, T12 2 Joe D X27, S28 3 Bob S F12, F13, X43, S44, X38, S90 4 Steve F D25
  2. I hear ya. I am trying to work with an old DB and I definitely need to rebuild some of these tables. I could do this by combining the 2 tables into 1, using almost the same query I have above, except adding INSERT INTO to make a new table, but even then, the multiple records issue would persist. Any ideas?
  3. $query = "SELECT Table1.*, Table2.A, Table2.B, Table2.C, Table2.D, Table2.E FROM Table1 INNER JOIN Table2 ON Table1.A = Table2.A Issue is that there are multiple matches for some instances, like so: Table1.A value = 1777 (only once since it is a UniqueID) Table2.A value = 1777 (3 records with this ID value) So I will get 3 records returned since Table1.A matches 3 records in Table2.A. I want to merge the 3 records in Table2 into 1 record and then match that with Table1 where the UniqueID is the same. Make sense?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.