i have two databases, one with twelve columns and one with four columns. the two databases share a common account code that i use to match the two DB together. i only need one column from the smaller database, and this column will need to be inserted into one field of the output results...
i'm somewhat new to mySQL, so i'm unsure of how to control how an output set will look... when i do :
SELECT * from db1, db2 where db1.acct = db1.acct
i only get the output from db2 joined on the end of db1... but because there are, say 1 reference to acct1 in db1, but 22 references to it in db2, some output is being duplicated.
i need something like the following:
+---------+--------+------------------------------+--------------+
|acct.......|..num..|.......+===========+..|....other......|
|.............|...........|.......||........................||..|...................|
|.............|...........|.......||.......from..........||..|...................|
|.............|...........|.......||.........db2.........||..|...................|
|.............|...........|.......||........................||..|...................|
|.............|...........|.......+===========+..|...................|
|.............|...........|......................................|...................|