Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Undocumented quasi feature/quirk sql 2005

Status
Not open for further replies.

Jamfool

IS-IT--Management
Apr 10, 2003
484
GB
Just found the following interesting, although its only semi useful because the formatting is lost when saved.

Run something similar to the following in grid mode:

Code:
select top 1 name  from syscolumns for xml auto, elements

you will then get the usual results window,
which u can click on and see the formatted xml.

e.g

<syscolumns>
<name>base_schema_ver</name>
</syscolumns>

However it has a region code block so u can collasp the code to

<syscolumns>[...]

Ok so far so good. However you can copy and paste this xml to your query window
and it retains the region code block :p

...and i can delete out all the extra code to leave me with just the code block...i can then use this to hide large bits of sql :p

--code block
select 0 --ok i was lying when i said large :p
--code block end
select 1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top