Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.sqlserver.programming > #31260

Re: Two XML data compare(for logging)

X-Received by 10.129.84.193 with SMTP id i184mr8757177ywb.48.1436313435892; Tue, 07 Jul 2015 16:57:15 -0700 (PDT)
X-Received by 10.140.37.48 with SMTP id q45mr104274qgq.34.1436313435874; Tue, 07 Jul 2015 16:57:15 -0700 (PDT)
Path csiph.com!aioe.org!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!m107no1249750qgd.1!news-out.google.com!w15ni32062qge.0!nntp.google.com!m107no1249746qgd.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups microsoft.public.sqlserver.programming
Date Tue, 7 Jul 2015 16:57:15 -0700 (PDT)
In-Reply-To <XnsA4D11D28C806Yazorman@127.0.0.1>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=78.174.178.212; posting-account=wwZwIQoAAACf9QIcU15ShJKDZskdIUWE
NNTP-Posting-Host 78.174.178.212
References <efbd7296-7356-486b-8c51-0c7533f27309@googlegroups.com> <XnsA4D11D28C806Yazorman@127.0.0.1>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <1b951ccb-c1fd-4226-8005-96589633a3e1@googlegroups.com> (permalink)
Subject Re: Two XML data compare(for logging)
From Vedat Pala <vedatpala@gmail.com>
Injection-Date Tue, 07 Jul 2015 23:57:15 +0000
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
Lines 29
Xref aioe.org microsoft.public.sqlserver.programming:31260

Show key headers only | View raw


8 Temmuz 2015 Çarşamba 01:10:49 UTC+3 tarihinde Erland Sommarskog yazdı:
> Vedat Pala (vedatpala@gmail.com) writes:
> > I just want to see changing values.
> > 
> > I have got 3  fields. 
> > 1.field [OldContent] [xml] NULL, 
> > 2.field [NewContent] [xml] NULL, 
> > 3.fiedl [UpdateContent] [xml] NULL, 
> > 
> > I want to compare the data in two fields. 
> > Results I want to write to the 3.field.([OldContent]) 
> > 
> > How can I do it in SQL server? 
> > 
> 
> Please check your previous thread to which I posted a solution.

The solution is not complete enough  because;
DECLARE @old xml = '<row GUEST_ID="14" GUEST_NAME="VEDAT" />', 
        @new xml = '<row GUEST_ID="14" GUEST_NAME="VEDAT35" GUEST_SURNAME="PALA" />" '

your  result only 
<row GUEST_SURNAME="PALA"
but true result
GUEST_NAME="VEDAT35" GUEST_SURNAME="PALA" 
why
old value vedat---> new value(updated)   VEDAT35
old value SURNAME=''  new value(updated)  'PALA'

Back to microsoft.public.sqlserver.programming | Previous | Next | Find similar


Thread

Re: Two XML data compare(for logging) Vedat Pala <vedatpala@gmail.com> - 2015-07-07 16:57 -0700

csiph-web