The error I am getting says field names must be unique within Tale. This error pops up when about to load Temp. But If I want all my columns isnt Load * from resident the right way? Because I will be dropping the lTest Table and later will be fropping the MxTemp Table when I use it as a resident for another table.
You load the resident-load with a wildcard which meant that you included the field [New Temp ID] from the table lTest and within these load you call the max([New Temp ID]) also [New Temp ID] and there it is doubled. But this isn't the only issue then your group by won't include all fields from the wildcard. Therefore try something like this:
What exactly are you trying to do. Not just unique field name, but also the group by statement will be an issue in what you are doing here. If you can elaborate on what you are trying to do, may be we might be able to help you out here