Hi
I want to insert duplicate row count in counter coulmn of same table. I had coded this but i get alias issue (illegal usage of Alias)here.
here is my query
UPDATE tablea C
FROM
(
SELECT col1,
Col2,
COUNT(col1 || Col2)
AS CNT
FROM tablea
WHERE col1 > '
AND col2 > '
HAVING COUNT(*) > 1
GROUP BY 1,2
) AS CCNT
SET c.counter col = CCNT.CNT
WHERE
(c.Col1,c.Col2)
IN (SELECT col1,
col2
FROM tablea
WHERE col1 > '
AND col2 > '
HAVING COUNT(*) > 1
GROUP BY 1,2
)
kindly help...
I want to insert duplicate row count in counter coulmn of same table. I had coded this but i get alias issue (illegal usage of Alias)here.
here is my query
UPDATE tablea C
FROM
(
SELECT col1,
Col2,
COUNT(col1 || Col2)
AS CNT
FROM tablea
WHERE col1 > '
AND col2 > '
HAVING COUNT(*) > 1
GROUP BY 1,2
) AS CCNT
SET c.counter col = CCNT.CNT
WHERE
(c.Col1,c.Col2)
IN (SELECT col1,
col2
FROM tablea
WHERE col1 > '
AND col2 > '
HAVING COUNT(*) > 1
GROUP BY 1,2
)
kindly help...