|
-
Nov 15th, 2019, 02:58 AM
#1
Thread Starter
Addicted Member
Why Xquery is converting Vbcrlf to Vblf
<Root>
<Row>
<Col2>data</Col2>
<Col3>data1</Col3>
<Col4>data3</Col4>
<Col1>Rowid1</Col1>
</Row>
<Row>
<Col2>data</Col2>
<Col3>data2</Col3>
<Col4>data4</Col4>
<Col1>Rowid2</Col1>
</Row>
</Root>
The above xml is stored in sql server with datatype xml.
Here data3 is entered by user eg: data3 = A & vbnewline & B.
Query 1:
select column from table where [Sl_No]=7203
Result : A & vbnewline & B
Query 2:
select column.value('(/Root/Row[Rowid=''1'']/col4/text())[1]','varchar(max)') from table where [Sl_No]=7203
Result : A & vblf & B
All users use windows os.
why is xquery converting vbnewline(vbcrlf) to vblf?
-
Nov 15th, 2019, 03:13 AM
#2
Re: Why Xquery is converting Vbcrlf to Vblf
CrLf is specific to Windows as a line break with just Lf being far more common. Your query is likely being cross-platform-friendly. The RichTextBox control removes carriage returns too. A line break should just be considered a line break, regardless of what characters it's composed of.
-
Nov 15th, 2019, 07:47 AM
#3
Thread Starter
Addicted Member
Re: Why Xquery is converting Vbcrlf to Vblf
Query 2 giving result A & vblf & B for only some rowid for others it gives A & vbnewline & B.
-
Nov 15th, 2019, 07:51 AM
#4
Re: Why Xquery is converting Vbcrlf to Vblf
1) Then that's probably what's in there... you'd need to look at the file/data at the binary level to really know, anything else will be an interpretation and may skew what you're seeing.
2) Is it really an issue? At this point, I feel like you're splitting hairs (newlines)...
-tg
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|