Article ID: 164917
Article Last Modified on 10/3/2003
SELECT T1.title_id,
pubid = COALESCE((select T3.pub_id from publishers T3
where T3.pub_id = T1.pub_id and
T3.pub_id = T2.pub_id),
(select T3.pub_id from publishers T3
where T3.pub_id = T1.pub_id and
T3.pub_id = T2.pub_id),
'BU1032')
FROM Titles T1, Titles T2
WHERE T1.title_id = 'BU1032'
SELECT T1.title_id,
pubid=
CASE
WHEN
(select T3.pub_id from publishers T3
where T3.pub_id = T1.pub_id and
T3.pub_id = T2.pub_id)
IS NOT NULL THEN
(select T3.pub_id from publishers T3
where T3.pub_id = T1.pub_id and
T3.pub_id = T2.pub_id)
WHEN
(select T3.pub_id from publishers T3
where T3.pub_id = T1.pub_id and
T3.pub_id = T2.pub_id)
IS NOT NULL THEN
(select T3.pub_id from publishers T3
where T3.pub_id = T1.pub_id and
T3.pub_id = T2.pub_id)
ELSE
'BU1032'
END
FROM Titles T1, Titles T2
WHERE T1.title_id = 'BU1032'
SELECT T1.title_id,
pubid = COALESCE(convert(varchar,(select T3.pub_id from publishers T3
where T3.pub_id = T1.pub_id and
T3.pub_id = T2.pub_id)),
'BU1032')
FROM Titles T1, Titles T2
WHERE T1.title_id = 'BU1032'
156292 : FIX: Create View with Nested SELECT in CASE Causes Error 206
Additional query words: coalesce unknown token
Keywords: kbbug kbusage KB164917