Does SQL Server Support XML Functions
Jul 20, 2005
Hi,
Do any versions of SQL Server support the following functions, as
they appear in the Oracle Database:-
1) XMLElement
2) XMLAttributes
3) XMLForest
Thanks in Advance for your reply
Bye
Amardeep Verma
View 4 Replies
ADVERTISEMENT
Jul 19, 2006
good idea or bad idea?
View 2 Replies
View Related
Nov 10, 2007
Hi
I sent a long string of ID from front end to my stored procedure...till now I was using varchar(8000)...but if the string crossess that limit it is breaking.
If I try to use text datatype..It doesn't support rtrim, stuff functions etc...
So could any one suggest me a best way to save a long string without any restriction of size...
My front end is C#.Net and Back End is SQL SERVER 2000
Thanks in advance
View 1 Replies
View Related
May 26, 2006
I was playing around with the new SQL 2005 CLR functionality andremembered this discussion that I had with Erland Sommarskog concerningperformance of scalar UDFs some time ago (See "Calling sp_oa* infunction" in this newsgroup). In that discussion, Erland made thefollowing comment about UDFs in SQL 2005:[color=blue][color=green]>>The good news is that in SQL 2005, Microsoft has addressed several of[/color][/color]these issues, and the cost of a UDF is not as severe there. In fact fora complex expression, a UDF in written a CLR language may be fasterthanthe corresponding expression using built-in T-SQL functions.<<I thought the I would put this to the test using some of the same SQLas before, but adding a simple scalar CLR UDF into the mix. The testinvolved querying a simple table with about 300,000 rows. Thescenarios are as follows:(A) Use a simple CASE function to calculate a column(B) Use a simple CASE function to calculate a column and as a criterionin the WHERE clause(C) Use a scalar UDF to calculate a column(D) Use a scalar UDF to calculate a column and as a criterion in theWHERE clause(E) Use a scalar CLR UDF to calculate a column(F) Use a scalar CLR UDF to calculate a column and as a criterion inthe WHERE clauseA sample of the results is as follows (time in milliseconds):(295310 row(s) affected)A: 1563(150003 row(s) affected)B: 906(295310 row(s) affected)C: 2703(150003 row(s) affected)D: 2533(295310 row(s) affected)E: 2060(150003 row(s) affected)F: 2190The scalar CLR UDF function was significantly faster than the classicscalar UDF, even for this very simple function. Perhaps a more complexfunction would have shown even a greater difference. Based on this, Imust conclude that Erland was right. Of course, it's still faster tostick with basic built-in functions like CASE.In another test, I decided to run some queries to compare built-inaggregates vs. a couple of simple CLR aggregates as follows:(G) Calculate averages by group using the built-in AVG aggregate(H) Calculate averages by group using a CLR aggregate that similatesthe built-in AVG aggregate(I) Calculate a "trimmed" average by group (average excluding highestand lowest values) using built-in aggregates(J) Calculate a "trimmed" average by group using a CLR aggregatespecially designed for this purposeA sample of the results is as follows (time in milliseconds):(59 row(s) affected)G: 313(59 row(s) affected)H: 890(59 row(s) affected)I: 216(59 row(s) affected)J: 846It seems that the CLR aggregates came with a significant performancepenalty over the built-in aggregates. Perhaps they would pay off if Iwere attempting a very complex type of aggregation. However, at thispoint I'm going to shy away from using these unless I can't find a wayto do the calculation with standard SQL.In a way, I'm happy that basic SQL still seems to be the fastest way toget things done. With the addition of the new CLR functionality, Isuspect that MS may be giving us developers enough rope to comfortablyhang ourselves if we're not careful.Bill E.Hollywood, FL------------------------------------------------------------------------- table TestAssignment, about 300,000 rowsCREATE TABLE [dbo].[TestAssignment]([TestAssignmentID] [int] NOT NULL,[ProductID] [int] NULL,[PercentPassed] [int] NULL,CONSTRAINT [PK_TestAssignment] PRIMARY KEY CLUSTERED([TestAssignmentID] ASC)--Scalar UDF in SQLCREATE FUNCTION [dbo].[fnIsEven](@intValue int)RETURNS bitASBEGINDeclare @bitReturnValue bitIf @intValue % 2 = 0Set @bitReturnValue=1ElseSet @bitReturnValue=0RETURN @bitReturnValueEND--Scalar CLR UDF/*using System;using System.Data;using System.Data.SqlClient;using System.Data.SqlTypes;using Microsoft.SqlServer.Server;public partial class UserDefinedFunctions{[Microsoft.SqlServer.Server.SqlFunction(IsDetermini stic=true,IsPrecise=true)]public static SqlBoolean IsEven(SqlInt32 value){if(value % 2 == 0){return true;}else{return false;}}};*/--Test #1--Scenario A - Query with calculated column--SELECT TestAssignmentID,CASE WHEN TestAssignmentID % 2=0 THEN 1 ELSE 0 END ASCalcColumnFROM TestAssignment--Scenario B - Query with calculated column as criterion--SELECT TestAssignmentID,CASE WHEN TestAssignmentID % 2=0 THEN 1 ELSE 0 END ASCalcColumnFROM TestAssignmentWHERE CASE WHEN TestAssignmentID % 2=0 THEN 1 ELSE 0 END=1--Scenario C - Query using scalar UDF--SELECT TestAssignmentID,dbo.fnIsEven(TestAssignmentID) AS CalcColumnFROM TestAssignment--Scenario D - Query using scalar UDF as crierion--SELECT TestAssignmentID,dbo.fnIsEven(TestAssignmentID) AS CalcColumnFROM TestAssignmentWHERE dbo.fnIsEven(TestAssignmentID)=1--Scenario E - Query using CLR scalar UDF--SELECT TestAssignmentID,dbo.fnIsEven_CLR(TestAssignmentID) AS CalcColumnFROM TestAssignment--Scenario F - Query using CLR scalar UDF as crierion--SELECT TestAssignmentID,dbo.fnIsEven_CLR(TestAssignmentID) AS CalcColumnFROM TestAssignmentWHERE dbo.fnIsEven(TestAssignmentID)=1--CLR Aggregate functions/*using System;using System.Data;using System.Data.SqlClient;using System.Data.SqlTypes;using Microsoft.SqlServer.Server;[Serializable][Microsoft.SqlServer.Server.SqlUserDefinedAggregate (Format.Native)]public struct Avg{public void Init(){this.numValues = 0;this.totalValue = 0;}public void Accumulate(SqlDouble Value){if (!Value.IsNull){this.numValues++;this.totalValue += Value;}}public void Merge(Avg Group){if (Group.numValues > 0){this.numValues += Group.numValues;this.totalValue += Group.totalValue;}}public SqlDouble Terminate(){if (numValues == 0){return SqlDouble.Null;}else{return (this.totalValue / this.numValues);}}// private accumulatorsprivate int numValues;private SqlDouble totalValue;}[Serializable][Microsoft.SqlServer.Server.SqlUserDefinedAggregate (Format.Native)]public struct TrimmedAvg{public void Init(){this.numValues = 0;this.totalValue = 0;this.minValue = SqlDouble.MaxValue;this.maxValue = SqlDouble.MinValue;}public void Accumulate(SqlDouble Value){if (!Value.IsNull){this.numValues++;this.totalValue += Value;if (Value < this.minValue)this.minValue = Value;if (Value > this.maxValue)this.maxValue = Value;}}public void Merge(TrimmedAvg Group){if (Group.numValues > 0){this.numValues += Group.numValues;this.totalValue += Group.totalValue;if (Group.minValue < this.minValue)this.minValue = Group.minValue;if (Group.maxValue > this.maxValue)this.maxValue = Group.maxValue;}}public SqlDouble Terminate(){if (this.numValues < 3)return SqlDouble.Null;else{this.numValues -= 2;this.totalValue -= this.minValue;this.totalValue -= this.maxValue;return (this.totalValue / this.numValues);}}// private accumulatorsprivate int numValues;private SqlDouble totalValue;private SqlDouble minValue;private SqlDouble maxValue;}*/--Test #2--Scenario G - Average Query using built-in aggregate--SELECT ProductID, Avg(Cast(PercentPassed AS float))FROM TestAssignmentGROUP BY ProductIDORDER BY ProductID--Scenario H - Average Query using CLR aggregate--SELECT ProductID, dbo.Avg_CLR(Cast(PercentPassed AS float)) AS AverageFROM TestAssignmentGROUP BY ProductIDORDER BY ProductID--Scenario I - Trimmed Average Query using built in aggregates/setoperations--SELECT A.ProductID,CaseWhen B.CountValues<3 Then NullElse Cast(A.Total-B.MaxValue-B.MinValue ASfloat)/Cast(B.CountValues-2 As float)End AS AverageFROM(SELECT ProductID, Sum(PercentPassed) AS TotalFROM TestAssignmentGROUP BY ProductID) ALEFT JOIN(SELECT ProductID,Max(PercentPassed) AS MaxValue,Min(PercentPassed) AS MinValue,Count(*) AS CountValuesFROM TestAssignmentWHERE PercentPassed Is Not NullGROUP BY ProductID) BON A.ProductID=B.ProductIDORDER BY A.ProductID--Scenario J - Trimmed Average Query using CLR aggregate--SELECT ProductID, dbo.TrimmedAvg_CLR(Cast(PercentPassed AS real)) ASAverageFROM TestAssignmentGROUP BY ProductIDORDER BY ProductID
View 9 Replies
View Related
Dec 5, 2005
Reader Community
I've just started hosting my newly created Microsoft Visual Web Developer 2005 Express Edition web site. Unfortunately the Login group membership functions will not function correctly. Having contacted the web service hosting provider, They replied: "We do not support SQL express2005. The only way to use the extra functions of ASP.NET2 such as group membership is if it is using an SQL 2000 database to connect to. "
Is it possible to design web sites with Microsoft Visual Web Developer 2005 Express Edition that store membership details on an SQL 2000 database?
I've just paid £88 approx. $140 for a years subscription, have I chosen the wrong web service hosting provider?
Should I have designed the web site with a better web site design software tool that also makes designing membership login functionality easy, just as Microsoft Visual Web developer 2005 express edition?
Look forward to all comments?
Regards
Philip
View 1 Replies
View Related
Jan 21, 2008
Does Sql Server Compact Edition 3.5 support RDA synchronization with Sql Server 2000 database?
View 4 Replies
View Related
Jun 3, 2015
As CM doesn't support SQL authentication, and if access SQL Server on another domain with no trust, we cannot use Windows authentication as well.
CM only supports Windows authentication, but for large organizations which will have multi domains.
I am thinking if there is no proper way/tool, we will develop one then.
View 0 Replies
View Related
Sep 15, 2015
UAT environment : SQL Server 2008 R2 SP3 Enterprise Edition
SANDBOX environment : SQL Server 2008 R2 SP3 Standard Edition
I have a database backup (.bak) that was taken from UAT environment that has CDC enabled on some tables. I want to restore that database into my SANDBOX environment which does not support CDC (because of standard edition). The restore process fails due to this incompatibility. Is there any way to restore without CDC (I dont CDC enabled on my SANDBOX; just my data from the backup) ?
View 0 Replies
View Related
Feb 20, 2007
Hi, I'm trying to convert our application and support additional east asian languages such as chinese simplified, japanese and korean. I know how to make the asp.net side work by support UTF-8 / global resource files / UICulture and whatever. But what do I have to do on the Sql Server side? I tested a few samples and i'm getting garbage characters after entring some chinese/japanese characters. Another unrelated question, I wrote some custom store procedures (dyanmically concatnated strings), I dont' have sql server 2005, so I'm wondering if I deploy it to sql server 2005, will 2005 be backward compatiable with 2000? I don't have any triggers and stuff, so I'm just wondering if you know anything about it. Thanks.
View 2 Replies
View Related
Sep 19, 2001
Can anyone tell me what's the last Microsoft
support date for sql server 7.0 ?
thanks
View 1 Replies
View Related
Oct 5, 2000
How many processors can SQL server 7.0 support? If the sql server box has 2 CPUs, will sql server 7.0 utilize both ? or sql server use one and NT use the other?
Thanks in advance.
View 1 Replies
View Related
Jul 13, 1998
Hi everyone,
I know that SQL Server 6.5 doesn`t support UNICODE. Does SQL Server 7 support UNICODE?
Thanks...
View 1 Replies
View Related
Nov 24, 2004
does anyone know when they are going to stop supporting SQL server 2000???
View 4 Replies
View Related
May 17, 2004
When I have FOR UPDATE in query string I get SQL error:
FOR UPDATE cannot be specified on a READ ONLY cursor.
I wonder if MS SQL Server does this type of positional update differently than DB2 and Oracle.
Thanks.
View 5 Replies
View Related
Oct 18, 2005
I am using MS SQL Server 2005 n Visual Studio dot net 2005, When starting the managment studio i connect using windows authentication but the problem arises when i need to open an oledbconnection via ado.net with the syntax:
oconn=new oledbconnection(provider=;data source=,user id=,password equal) since windows doesnt include any password i cant use the user id and password fields which causes errors althugh i created a password for my windows account the same stuff again
is there any problem to change the connection method from windows authentication to sql server authentication and how can i create a login id and password.
thank you
View 3 Replies
View Related
Jul 13, 2007
Is sql server 2005 SP2 supported on windows server 2003 SP2?
View 5 Replies
View Related
Jun 6, 2007
Hi,
Please do inform me about the SQL server database capacity of handing the data.
Well, I€™m a designing Data warehouse database on SQL server 2005 my first time load of data is 9 million records for 30 years of period, and future growth of data would be almost 20 million for the up coming 10 years.
Will this database would be able to handle that much of data.
Thank you
View 4 Replies
View Related
Dec 11, 2007
Would someone please make a clarification for me on the mainstream desupport of SQL Server 2000. In the following url it states that the desupport will take place 4/8/2008.
http://support.microsoft.com/lifecycle/?LN=en-us&p1=2852&x=12&y=11
Yet, if you read the lifecycle policy it at the following location it states that mainstream support is for 2-5years after the release of the successor product which ever is longer.
http://support.microsoft.com/gp/lifepolicy
Since SQL Server 2005 was released 4/8/2005 then five years would put it on support until 4/8/2010. Would someone please correct me where I am reading this incorrectly?
Thanks
View 1 Replies
View Related
Jan 30, 2007
Hi,
I am using sql server 2000 and 2005 in my web application. I want to know which UTF format does sql server 2000 and 2005 support?
UTF-8 or UTF-16
Thanks & Regards
Priyank kansal
View 2 Replies
View Related
Mar 30, 2006
For some reason, when I try to access a database diagram on our new 2005 SQL Server, I get the following error msg:
"Database diagram support objects cannot be installed because this database does not have a valid owner"
It then goes on to instruct me to either use Properties > Files or ALTER AUTHORIZATION to change the database owner.
Well, I've done that - and it clearly shows that there is an owner of the database, but even if I log in as that owner, the error msg continues to come up everytime I try to access Diagrams.
I found a post to run the following stored procedure which will set the sql server compatability level:
EXEC sp_dbcmptlevel database_name, 90
After running that in the query window of Management Stduio, I get the following msg below on the Messages tab:
"DBCC execution completed. If DBCC printed error messages, contact your system administrator."
I then try to create a new diagram again, and I get the same initial error (at the top of this post).
What do I need to do in order to create a DB diagram?
View 11 Replies
View Related
Nov 16, 2001
How well SQL Server can support 300 million records...
Any body is working on big database like this. can anyone give me some input on this. it's going to be 60GB database size.
View 1 Replies
View Related
Jun 29, 2000
IN ONE OF THE ADVERTISEMENT I SAW, IT SAYS "WE NEED PRODUCTION SUPPORT EXPERIENCE". AND MINIMUM CRITERIA IS, HE/SHE SHOULD BE A SQL SERVER DBA.
My Question is, what do we mean by "PRODUCTION SUPPORT IN SQL SERVER".
Can anyone give a good explantion on that, please?. Thanks in advance.
Srinivasan.
View 1 Replies
View Related
Nov 2, 2006
Anybody have any idea where I can get the dates that Microsoft will support SQL Server 2000?
Thanks in advance.
View 2 Replies
View Related
Jan 17, 2008
Hi,
This is chirag patel.
we are going to develop web application which can disply data (Search Results) in different language.
if user selected country Japan, then search results should be in Japanese.
if user selected country Chian, then search results should be in Chinese.
now i want to store all these read only data in Database. how and where i can store it?
do i need to have different Databases? or with single database also i can achive?
I means what is advisable approach to achieve this?
if Single Database for all countries then how i can store same data in different languages in single table?
please guide me if anyone know how to achive such kind of scenario in SQL Server?
View 1 Replies
View Related
Jul 23, 2005
Hello,I would like to know whether it is possible to execute DTS(Data Transformation Services) packages created from withinthe EM (Enterprise Manager) user interface, from the commandline. That is, is it possible to execute a command at the DOSprompt which will execute, and optionally also reconfigure,the DTS package? This would allow invoking DTS packagesfrom within scripts.Thank you for your replies,Neil
View 2 Replies
View Related
Jul 23, 2005
Hi,does anyone kown if the final release or one of the next Betas ofSQL-Server 2005 will support XQuery-Statemets including the LET-Feature.Thanks,Tobias
View 1 Replies
View Related
Dec 21, 2005
Hi
I want to manage my servers from a central location and have the ability to manage my packges too. Unfortunatley my servers are across domains which means I have to use SQL Server Login, which isn't a bad thing. However for some bizzare reason I can't connect to Integration Services using this method, only windows authentication which is a complete pain in the butt from a management stand point as I have to copy packages to various servers rather than add them from a central point.
Does anyone know if this bug/feature or what ever Microsoft is calling it will be fixed or know of any workarounds.
Thanks
View 11 Replies
View Related
Feb 15, 2007
Hi,
I've tried to enclose a few database operations in a TransactionScope block but it looks like SQL Server CE RM does ignores ambiental transaction.
Here is the code:
static void TestTxn() {
// Command to insert an integer in a table with a single integer column
string cmdPassText = "INSERT TESTTABLE (INTFIELD) VALUES(1)";
// Command to force field type mismatch exception
string cmdFailText = "INSERT TESTTABLE (INTFIELD) VALUES('Foo')";
using (TransactionScope scope = new TransactionScope()) {
using (SqlCeConnection conn = new SqlCeConnection("DataSource = 'Test.sdf'")) {
try {
conn.Open();
SqlCeCommand cmdPass = new SqlCeCommand(cmdPassText, conn);
returnValue = cmdPass.ExecuteNonQuery();
SqlCeCommand cmdFail = new SqlCeCommand(cmdFailText, conn);
returnValue = cmdFail.ExecuteNonQuery();
}
catch (Exception ex){
Console.WriteLine("Command failed");
Console.WriteLine("Exception Message: {0}", ex.Message);
}
}
scope.Complete();
}
}
After first command suceeds and seccond command failes table still has one affected row after transaction.
Am I doing something wrong or System.Transactions.Transaction is not supported with SQL Server CE RM?
Thanks,
Aleksandar
View 3 Replies
View Related
Sep 4, 2007
Hi friends,
I am currently using SQL Server 2000 server. I have run some BCP command to import data to SQL from CSV and Text files with the help of FORMAT files through Windows Scheduler.
My doubt is, if I swich to SQL Server 2005, whether the same BCP commands will supported? If no, What are the things I need to do to run the BCP commands in 2005 as in 2000?
I heard that the BCP utility is no longer support in 2005 and this can be done thru SSIS utility. Is it right...?
Is SQL Server 2005 support to use the BCP commands without going to SSIS utility?
Please help. Thanks in advance.
Regards,
Sethu.
View 1 Replies
View Related
Oct 2, 2007
Hi All,
I'm trying to ensure that the access to my symmetric key is validated every use via the use of (X.509 Certifcate) Online Certificate Status Protocol (OCSP).
Question: When a Certificate encrypted Symmetric Key is opened in SQL Server 2005, does SQL Server support OCSP revocation checking?
If it does support OCSP: Can the Certificate Revocation List Distribution Point of the certificate only contain an OCSP distribution point (instead of also including HTTP, LDAP, etc)?
This is really important as I do not want any cached CRL to authorise the access to this highly sensitive data...
Platform:
- SQL Server 2005 on Windows Server 2003 R2
- Certificate Services on Windows Server 2003 R2
Refer to:
USE AdventureWorks;
OPEN SYMMETRIC KEY SymKeyMarketing3
DECRYPTION BY CERTIFICATE MarketingCert9;
GO
http://msdn2.microsoft.com/en-us/library/ms190499.aspx
Regards
Andrew R.
View 14 Replies
View Related
Dec 7, 2005
Is ISNULL ( check_expression , replacement_value ) supported in SQL Server 2005 Mobile edition.
View 7 Replies
View Related
Nov 27, 2007
Can i add a InputOut parameter into a command and run it in sqlCE3.5 ?
lilke this:
Database db = GetDatabase();
DbCommand cm =db.GetSqlStringCommand("@NewDate=getdate()");
db.AddParameter(cm, "@NewDate", DbType.DateTime, ParameterDirection.InputOutput, "", DataRowVersion.Default, DateTime.Now );
db.ExecuteNonQuery(cm);
DateTime newDate= (DateTime)cm.Parameters["@NewDate"].Value;
View 1 Replies
View Related
Sep 19, 2006
Hello,
I would like to see if Microsoft has issued any announcement on SQL Server 2000 end of support. If anyone is aware of this or seen new posts/articles, please let me know.
Thank you!
View 3 Replies
View Related