SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Control chars in XML


Control chars in XML

Author
Message
honza.mf
honza.mf
SSCommitted
SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)

Group: General Forum Members
Points: 1945 Visits: 1323
Comments posted to this topic are about the item Control chars in XML



See, understand, learn, try, use efficient
© Dr.Plch
Oleg Netchaev
Oleg Netchaev
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1783 Visits: 1814
This is an excellent question, thank you. I thoroughly enjoyed it because I found it to be pretty difficult to answer correctly. I suspect that "most characters illegal" means all except the tab (char(9)), linefeed (char(10), 0xA), carriage return (char(13), 0xD) and the space(char(32) 0x20). I am curious to find out how the results of your

select * from #t for xml auto;


will look in SSMS results window, will definitely do it tomorrow morning.

Oleg
Maddy...!
Maddy...!
SSC Journeyman
SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)

Group: General Forum Members
Points: 85 Visits: 213
hello frnds....


wht ever it may be in order to run completely a block of t-sql code it should be syntax error free

i think there is no += operator in database so the code itself is wrong and u cant even think of it running how can you expect us to post answer for it.......

;-);-);-);-);-);-);-);-);-);-);-);-);-);-);-);-);-);-);-);-);-);-);-);-);-);-)
honza.mf
honza.mf
SSCommitted
SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)

Group: General Forum Members
Points: 1945 Visits: 1323
Maddy...! (5/19/2010)
hello frnds....


wht ever it may be in order to run completely a block of t-sql code it should be syntax error free

i think there is no += operator in database so the code itself is wrong and u cant even think of it running how can you expect us to post answer for it.......

;-);-);-);-);-);-);-);-);-);-);-);-);-);-);-);-);-);-);-);-);-);-);-);-);-);-)

This code is valid!
+= operator is legal in the current version of SQL Server.
I expect people to answer questions without running code. I know, I'm old enough to be so naive.



See, understand, learn, try, use efficient
© Dr.Plch
Koen Verbeeck
Koen Verbeeck
One Orange Chip
One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)

Group: General Forum Members
Points: 27477 Visits: 13268
honza.mf (5/19/2010)
Maddy...! (5/19/2010)
hello frnds....


wht ever it may be in order to run completely a block of t-sql code it should be syntax error free

i think there is no += operator in database so the code itself is wrong and u cant even think of it running how can you expect us to post answer for it.......

This code is valid!
+= operator is legal in the current version of SQL Server.
I expect people to answer questions without running code. I know, I'm old enough to be so naive.


You should specify which environment is used in the question. As a SQL 2005 user, I saw that there would be an error. You even don't have to run the code to see that.

I cannot guess which environment you had in mind.


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
malleswarareddy_m
malleswarareddy_m
SSCrazy
SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

Group: General Forum Members
Points: 2207 Visits: 1189
Hi,

When I run this it will success fully executed.I changed it @i+=1 to @i=@i+1;
but it will show result as with out using for xml.






after for xml i executed but it opened on SSMS.But i saved it in the form XML.With IE i am unable to open.With for xml it shows in different.Please explain in detail abot this characters.but i understand that this char will return the value of the character.suppose char(65) will return A.but and also 32 is space i think.what are the charcters below 32.The result of sample data as shown below.

<_x0023_t a="�" />
<_x0023_t a="" />
<_x0023_t a="" />
<_x0023_t a="" />
<_x0023_t a="" />
<_x0023_t a="" />
<_x0023_t a="" />

Malleswarareddy
I.T.Analyst
MCITP(70-451)
honza.mf
honza.mf
SSCommitted
SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)

Group: General Forum Members
Points: 1945 Visits: 1323
da-zero (5/20/2010)

You should specify which environment is used in the question. As a SQL 2005 user, I saw that there would be an error. You even don't have to run the code to see that.

I cannot guess which environment you had in mind.


This one question was on XML. Yes, you are right, the environment was not specified.



See, understand, learn, try, use efficient
© Dr.Plch
Koen Verbeeck
Koen Verbeeck
One Orange Chip
One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)

Group: General Forum Members
Points: 27477 Visits: 13268
honza.mf (5/20/2010)
da-zero (5/20/2010)

You should specify which environment is used in the question. As a SQL 2005 user, I saw that there would be an error. You even don't have to run the code to see that.

I cannot guess which environment you had in mind.


This one question was on XML. Yes, you are right, the environment was not specified.


Well, it could have been a trick question ;-) :-)


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
honza.mf
honza.mf
SSCommitted
SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)

Group: General Forum Members
Points: 1945 Visits: 1323
malleswarareddy_m (5/20/2010)
Hi,

after for xml i executed but it opened on SSMS.But i saved it in the form XML.With IE i am unable to open.With for xml it shows in different.Please explain in detail abot this characters.but i understand that this char will return the value of the character.suppose char(65) will return A.but and also 32 is space i think.what are the charcters below 32.




The characters below 32 are control characters. Once upon a time they were used to control devices like terminals or printers. Today only some are used regularly (tab, new line, line feed, esc...), others are used for special purposes.
Special position is the very first character char(0): it's typically used as a string terminator in C family languages and many other environments. Always take great care using this special one char.
There is at least one other control character: it's backspace (char (127)).

WITH XML clause is used to turn standard query output in form of XML. It has several forms - see books online.



See, understand, learn, try, use efficient
© Dr.Plch
honza.mf
honza.mf
SSCommitted
SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)

Group: General Forum Members
Points: 1945 Visits: 1323
da-zero (5/20/2010)

Well, it could have been a trick question ;-) :-)


Yes, it was a trick question :-D
Nitpickers concentrate on +=, others will find XML category :-P



See, understand, learn, try, use efficient
© Dr.Plch
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search