mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-10 15:35:35 +00:00
fix: wrong table name in sql query
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
-- set default next id for each category based on LEAD(id) (LEAD -> Next)
|
-- set default next id for each category based on LEAD(id) (LEAD -> Next)
|
||||||
|
|
||||||
UPDATE Category AS c
|
UPDATE category AS c
|
||||||
JOIN (
|
JOIN (
|
||||||
SELECT
|
SELECT
|
||||||
id,
|
id,
|
||||||
LEAD(id) OVER (PARTITION BY authorId ORDER BY id) AS nextCategoryId
|
LEAD(id) OVER (PARTITION BY authorId ORDER BY id) AS nextCategoryId
|
||||||
FROM Category
|
FROM category
|
||||||
) AS n ON c.id = n.id
|
) AS n ON c.id = n.id
|
||||||
SET c.nextId = n.nextCategoryId;
|
SET c.nextId = n.nextCategoryId;
|
||||||
|
|||||||
Reference in New Issue
Block a user