我正在尝试将以下文本插入到表格单元格中,即varchar(8000)
.
SELECT DISTINCT TOP 100 *
FROM
(SELECT TOP 10000 *
FROM
(SELECT DISTINCT
rklient, nimi + ISNULL('(' + UPPER(oleknimi) + ')' ,'') AS nimi,
mkood, kommentaar, regkood,
ISNULL(aadress + ' ','') AS aadress,
naitatel AS telefon, NULL AS lepingutelefon,
faks, email, www, NULL AS sisu, iprowid,
varvikood, klient, saitrank AS rank, emaid, 'F' AS typ,
infobaas, x, y, ISNULL(lahtiolekuaeg,'none') as lahtiolekuaeg,
lahtikomment, NULL AS koiksynid, paigutus, nimeviide, kupong
FROM
table_name WHERE reanr = '10') Tulemus) e
WHERE
nimeviide IS NULL
ORDER BY
rank DESC, iprowid
它给了我不正确的语法。我想是因为这个:'
我该如何解决这个问题?