Archive for the ‘Others’ Category


In order to convert newlines (replace \r\n with \n) across all varchar and nvarchar fields in a database below is the simple query that will be helpful to generate queries to update the data in table.


select 'update ' + sc.name + '.' + t.name + ' set ' + c.name + ' = REPLACE(REPLACE(' + c.name + ', CHAR(13), ''''), CHAR(10), '')'
from sys.columns c
inner join sys.systypes st
on c.system_type_id = st.xtype
and CHARINDEX('varchar', st.name) <> 0
inner join sys.tables t
on c.object_id = t.object_id
inner join sys.schemas sc
on t.schema_id = sc.schema_id

 

 


URL

1. Abbreviation: URL stands for Uniform Resource Locator
2. Meaning: URL is a subset of URI that specifies where an identified resource is available and the mechanism for retrieving it.Mechanism actually means one of the protocol schemes (e.g., http, ftp, file, mailto) provided by URI.
3. Examples:
• http:/www.example.com/MyApp/Index.aspx
Here, http is the protocol, example.com is the domain name, MyApp is the folder name, Index.aspx is the filename
http://example.com/articles/default.aspx
Here http is the protocol, example.com is the domain name, articles is the folder name and default.aspx is the file name

URI

1. Abbreviation: URI stands for Uniform Resource Identifier
2. Meaning: A URI is a superset of URL that identifies a resource either by location (URL), or a name(URN), or both (URL and URN).
3.Examples:
http://www.example.com
• /some/page.html
(more…)