Re: Remote Update (error -4425)
Posted in 1997
senyem@malitnet.net.my wrote: } } People, } } The statement below doesn't works: } } ---------------------------------------------------------- } UPDATE database@server-name:table-name } SET database@server-name:table-name.* = tmp_table-name.* } } | The variable "tmp_table-name" has not been defined } | LIKE the table "database@server-name:table-name". } | See error number -4425. } ----------------------------------------------------------- } } However, if I apply the same convention during INSERTion, it works: } } ---------------------------------------------------------------------- } INSERT INTO database@server-name:table-name VALUES (tmp_table-name.*) } } ** no problem, it work fine. } ----------------------------------------------------------------------- } } Why doesn't the system allowed for such UPDATE when the tmp_table-name } have been defined accordingly. } } Comment please. Are you saying that you DID: DEFINE tmp_table-name LIKE table_name.* or did you explicitly define each element of tmp_table-name. In Informix, you are not required to represent every column of a table in an INSERT statement even if you use the .* notation. Thus, as long as you have a value for every column that is specified NOT NULL in the schema, you can successfully insert with a record that has less elements than the table (the other columns are set to null). However, for a select, you are asking to select more columns than you have a place to put them. If you are absolutely, positively, 100%, without-a-doubt sure that your record contains every table column, then I'm wondering what the problem is as well. --Tim