Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Erland Sommarskog Newsgroups: comp.databases.ms-sqlserver Subject: Re: Unable to query xml data in sql server Date: Tue, 14 Jul 2020 11:49:25 +0200 Organization: Erland Sommarskog Lines: 8 Message-ID: References: <25356606-299b-4623-809d-0d6eb9af0906o@googlegroups.com> <4b1c3504-2511-4c3c-a5fb-b880e39caeb6o@googlegroups.com> <07f4ed04-6ddf-42e8-afac-655b93b690e3o@googlegroups.com> <1bed2a65-5433-4937-8341-754e4bfe4af8o@googlegroups.com> <15fe54f8-bced-4ff8-a6ba-5ead217270a5o@googlegroups.com> <4a865c7f-1a4f-4398-9150-36195d16012co@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Injection-Info: reader02.eternal-september.org; posting-host="b610f31ce8b263fa2f931e56c3e8a147"; logging-data="29707"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Ph7G2vVkn0nyFLs929at1" User-Agent: Xnews/2006.08.24 Mime-proxy/2.1.c.0 (Win32) Cancel-Lock: sha1:X55orkJmNoIqikocTBX5898YoSk= Xref: csiph.com comp.databases.ms-sqlserver:2060 chris (chris.sjpd@gmail.com) writes: > DECLARE @x xml = (select xmldata from xmltbl) > That statement will only work if there is a single row in the table. But what are you trying to acheive? You are not using @x in the rest of the script.