Monthly Archives: May 2007

Import an XML Schema file and Create XML schema Collection issue

/* In 2005 BOL, the XML schema collection is created by the following command: CREATE XML SCHEMA COLLECTION [ <relational_schema>. ]sql_identifier AS Expression "The Expression is a string constant or scalar variable. Is varchar, varbinary, nvarchar, nvarbinary, or xml type". … Continue reading

Posted in SQL server 2005 | Leave a comment

A Bug of REPLACE Function in SQL Server 2005 SP2

/* REPLACE function has the following syntax: REPLACE ( string_expression1 , string_expression2 , string_expression3 ) string_expression1 Is the string expression to be searched. string_expression1 can be of a character or binary data type. string_expression2 Is the substring to be found. … Continue reading

Posted in SQL server 2005 | Leave a comment

BCP and Line breaks in query command

/* BCP supports a query command as the data source when exporting data to a file. However, we need to be carefull when creating the query, e.g., the following query woeks fine in the dynamic t-SQL: */ DECLARE @Query nvarchar(300) … Continue reading

Posted in SQL server | Leave a comment