Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UPDATE Y INNER JOIN X ON ([Y].[Colu 1

Status
Not open for further replies.

chaos18

IS-IT--Management
Dec 31, 2002
32
US
UPDATE Y INNER JOIN X ON ([Y].[Column1]=[X].[Column1]) AND ([Y].[Column2]=[X].[Column2]) SET X.Info = [Y].[Info];


This is the query that i have,it looks at column1 and then at column2 for matching information and then updates the info field with the correct information...the only problem is that in the columns really arnt column1 looking at column1 and it seems to be making errors when i run the statement any help would be greatly appreciated

*X and Y are the respective table names;

Thomas Gunter, dba
 
<quote>
the only problem is that in the columns really arnt column1 looking at column1
</quote>

What does this mean?

If you get any errors, please post the error message.
 
my apologies for the confusion. what i mean is that &quot;column1&quot; is not the actual name of the column, but rather a simple way of uncomplicating the problem of confusing column names. does that make it any clearer? OH, on the note of errors is simply says &quot;an unexpected error has occured.&quot;
 
Ok, the error message don't say much so totally unsure of what the cause can be.

Are the info columns of the same data type?

Are there any foreign keys for x.info column?
 
the only thing different between the columns is the &quot;type&quot; column1 in x table is text and column1 in y table is number. i think that might be the cause but when i try to change i get an error about memory...and i know theirs plenty of it...any suggestions
 
The different types surely can cause problems.

To change the data type for a column a statement like

alter table x alter column column1 number
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top