SQL Server INSERT syntax
-
13-06-2021 - |
문제
I am trying to insert the following text into a table cell, which is 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
It gives me incorrect syntax. I suppose its because this: '
How do I workaround this?
올바른 솔루션이 없습니다
다른 팁
You can quote the '
character by simply doubling it ''
.
Example:
SELECT 'This is q single quote ''';
제휴하지 않습니다 StackOverflow