|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Yesterday @ 6:14 AM
Points: 1,102,
Visits: 1,197
|
|
Comments posted to this topic are about the item Control chars in XML
See, understand, learn, try, use efficient © Dr.Plch
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Yesterday @ 10:53 AM
Points: 1,662,
Visits: 1,709
|
|
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
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Monday, June 04, 2012 4:33 AM
Points: 45,
Visits: 210
|
|
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.......
                        
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Yesterday @ 6:14 AM
Points: 1,102,
Visits: 1,197
|
|
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
|
|
|
|
|
SSCrazy Eights
        
Group: General Forum Members
Last Login: Today @ 6:51 AM
Points: 9,373,
Visits: 6,470
|
|
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?
Member of LinkedIn. My blog at LessThanDot.
 MCSA SQL Server 2012 - MCSE Business Intelligence
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Today @ 12:39 AM
Points: 1,846,
Visits: 976
|
|
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)
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Yesterday @ 6:14 AM
Points: 1,102,
Visits: 1,197
|
|
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
|
|
|
|
|
SSCrazy Eights
        
Group: General Forum Members
Last Login: Today @ 6:51 AM
Points: 9,373,
Visits: 6,470
|
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Yesterday @ 6:14 AM
Points: 1,102,
Visits: 1,197
|
|
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
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Yesterday @ 6:14 AM
Points: 1,102,
Visits: 1,197
|
|
|
|
|