Hello, we are using Sybase ASA9 for our application
database. We are now in the process of upgrading our
application, and in that respect we have created a
table "maker". This is filled from a previous Vendor table, so that there are unique names. The ID's are NULL.
So therefore we want to create the ID's. One of our programmers have come up with an SQL, which works on our old database (Sybase 5.5) but in ASA9 it fails. And we're not able to see what is the error.
Here is the SQL:
UPDATE DBA.maker w
SET id_maker = (
(SELECT (count(y.name))
FROM maker x, maker y
WHERE w.name = x.name AND
(x.name) >=
(y.name) AND y.id_maker is null
GROUP BY (x.name )) + (SELECT IsNull(general_id,0) FROM sys_variables))
WHERE id_maker is null;
In 5.5 it goes through the table, and fills in unique
id's on every post, but in ASA9 a lot of the id's are equal. I guess it is a small change, but I cant find it.
We tried using a cursor, but that caused our replication to crash.
Please help.
Thank you
database. We are now in the process of upgrading our
application, and in that respect we have created a
table "maker". This is filled from a previous Vendor table, so that there are unique names. The ID's are NULL.
So therefore we want to create the ID's. One of our programmers have come up with an SQL, which works on our old database (Sybase 5.5) but in ASA9 it fails. And we're not able to see what is the error.
Here is the SQL:
UPDATE DBA.maker w
SET id_maker = (
(SELECT (count(y.name))
FROM maker x, maker y
WHERE w.name = x.name AND
(x.name) >=
(y.name) AND y.id_maker is null
GROUP BY (x.name )) + (SELECT IsNull(general_id,0) FROM sys_variables))
WHERE id_maker is null;
In 5.5 it goes through the table, and fills in unique
id's on every post, but in ASA9 a lot of the id's are equal. I guess it is a small change, but I cant find it.
We tried using a cursor, but that caused our replication to crash.
Please help.
Thank you