UPDATE doesn't work

UPDATE doesn't work

Post by simonzupa » Thu, 27 Jun 2002 22:48:47



Can someone tell me why this don't work and how to make it work ?


AS
UPDATE kategorije
Set kategorije.parentId=coalesce(c.idKategorije,0) FROM kategorije c

AND kategorije.parentId=-1
GO

I have table kategorije and I would like to update its parentId
column, with value of idKategorije column from the same table from
row, where (idKatOrg)=(parentIdOrg of updateabale row)

Thank you for your answer,
Simon

 
 
 

UPDATE doesn't work

Post by Anith Se » Thu, 27 Jun 2002 22:57:00


Here is an untested version. Post your table DDLs with
INSERT statements, if it doesn;t give you what you are looking
for -

UPDATE
     kategorije
SET
     parentId=coalesce(c.idKategorije,0)
FROM
     kategorije INNER JOIN kategorije c
          ON kategorije.idKatOrg = c.parentIdOrg
WHERE

AND
     c.parentId=-1

- Anith


> Can someone tell me why this don't work and how to make it work ?

> CREATE PROCEDURE sp_cat_vpisParent

> AS
> UPDATE kategorije
> Set kategorije.parentId=coalesce(c.idKategorije,0) FROM kategorije c

> AND kategorije.parentId=-1
> GO

> I have table kategorije and I would like to update its parentId
> column, with value of idKategorije column from the same table from
> row, where (idKatOrg)=(parentIdOrg of updateabale row)

> Thank you for your answer,
> Simon


 
 
 

1. Trigger on Update doesn't work

Hi, could anyone tell me why this TRIGGER doesn't
work? NOTHING happens when I update the table's
column named UNREGISTRED.
The create statement for the trigger is listed
down here.
Thanks, Jan Back
-----------------------------------------------
CREATE TRIGGER UpdProductUnregistred ON Product
FOR update AS
-- Check if column UNREGISTRED has been set to
the value of 1.
-- If it's 1, then delete all records from Basket
table that
-- have the same productno as this record.

   IF UPDATE(unregistred)
   BEGIN

      FROM inserted


      BEGIN

      END
   END
-----------------------------------------------

Sent via Deja.com http://www.deja.com/
Before you buy.

2. Need help with lists (P4W)

3. SP5a post update doesn't working

4. Reusing a cda with OCI

5. JSP - Access UPDATE doesn't work

6. Timeout errors

7. prepared statement update doesn't work

8. assignment type mismatch complaints

9. HELP...Informix Database ..rs.UPDATE doesn't work with Char-Fields

10. update doesn't work on win98

11. prepared statement update doesn't work

12. Scheduling DTS doesn't fail but doesn't work