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 ' + + '.' + + ' set ' + + ' = REPLACE(REPLACE(' + + ', CHAR(13), ''''), CHAR(10), '')'
from sys.columns c
inner join sys.systypes st
on c.system_type_id = st.xtype
and CHARINDEX('varchar', <> 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




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:/
Here, http is the protocol, is the domain name, MyApp is the folder name, Index.aspx is the filename
Here http is the protocol, is the domain name, articles is the folder name and default.aspx is the file name


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).
• /some/page.html