I\'m asking the question on behalf of someone that works for my client that asked me this. I\'m actually more familiar with mySQL than SQL Server, but unfortunately, SQL Server is what the client has
Basically I\'m trying to get a distinct count within this cubed result. But unfortuantly you cannot use Count(distinct(Field)) with cube and rollup (as stated here)
I\'m working on a stored procedure and at one point I want to check my table variable to see if there are exactly zero rows with a specific field equal null. In other words, for every row in my table,
I have a query that allows me to get records from a database table by giving it a minimum and maximum limit.
Consider this query in SQL Server 2000 returning XML. select * from Mytable employee for xml auto , elements
I have a stored procedure th开发者_如何学JAVAat returns a single recordset. is it possible to convert it into xml like below
Does anyone have a nifty way of validating telephone numbers using sql (SQL Server 2000). I need to select all users fro ma Db that have valid phone number
Given the following update statement: UPDATE @TableVariable SET city = T2.city FROM @TableVariable TV INNER JOIN dbo.TABLE_1 T1 WITH (NOLOCK)
I hav开发者_如何学编程e a SQL Server 2000 database and some tables in a database. I want to export them (the structure, definition and indexes) to another database.
I am currently upgrading a database server from SQL Server 2000 to SQL Server 2008 R2.One of my queries used to take under a second to run and now takes in excess of 3 minutes (running on faster a fas