hi Claudio,
claudio.blundo[ at ]gmail.com wrote:
[Quoted Text] > i got two tables, same structure table "028 - des" and table "028 - > prg".The table "028 - prg" is in my databese application but the "028 > - des" is the newest.I can't replace table "028 - prg" with "028 - > des" 'cause in any case i need to modify other stuff.i have to find > difference beetwen the tables.
What are you trying to achieve?
> There are in the two tables the same names of the fields an structure > and you can see it on the attachments.
> 1)the problem is that i don't know how manage a multifields with multi > records beetween two tables like this What do you mean?
> 2)how can i find differents records between, i wanna intercept the > records from "028 - prg" <> "028 - des" and replace them. Use a INNER JOIN on your primary key fields and compare the non key fields.
> table "028 - des" > Fields:danno, data, bene and impo > > 0281997004047 06051999 D'AMBROSIO > SERGIO > 638,86 > 0281997004047 26041999 D'AMBROSIO > SERGIO > 1.932,08 Looks like [danno] and [data] may be a candidate key, then your query SQL may look like this:
SELECT T1.[danno], T1.[data], T1.[bene], T2.[bene], T1.[impo], T2.[impo] FROM [028 - prg] T1 INNER JOIN [028 - des] T2 ON (T1.[danno] = T2.[danno]) AND (T1.[data] = T2.[data]) WHERE (T1.[bene] <> T2.[bene]) OR (T1.[impo] <> T2.[impo])
btw, consider using table names without spaces and special characters like '-'.
mfG --> stefan <--
|