Viewing 15 posts - 91 through 105 (of 288 total)
peter-757102 (12/14/2010)
First off, you need SQL Server Enterprise Edition or Developer Edition. None of the other editions of SQL Server 2005 or 2008 support partitioning. SQL...
December 14, 2010 at 11:55 am
you can just change the query to a select and check the count:SELECT COUNT(*) FROM CMLEDG WHERE BLDGID = '600' AND PERIOD = '201012';
December 10, 2010 at 4:41 pm
If you want to put your data in a consulable format (DDL and DML). Then someone can write a single query that'll do the update.
November 17, 2010 at 11:10 am
On point #3. If NVARCAHR(10) you can still store 10 characters (not just 5). But, yes they each take up twice the space of a non-unicode string.
November 17, 2010 at 11:07 am
Can you post some DDL, DML and expected output? This link can help with that:
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx
November 16, 2010 at 4:02 pm
Just a small correction to GSquareds advice, it's the object_id column:SELECT
OBJECT_NAME(object_id) AS TableOrViewName, *
FROM sys.indexes
November 16, 2010 at 11:06 am
You can, but I question if SQL is the right place to do it:DECLARE @T TABLE (ID INT, Colors VARCHAR(20))
INSERT @T (ID, Colors) VALUES
(1, 'Blue'),
(1, 'Green'),
(1, 'Red'),
(2, 'Red'),
(3, 'Green'),
(3,...
November 11, 2010 at 12:13 pm
Ripped from:
create table #rowcount (tablename varchar(128), rowcnt int)
exec sp_MSforeachtable
@command1 = 'insert into #rowcount select ''?'',
...
November 9, 2010 at 1:31 pm
In general, yes.
there are a bunch of considerations. But, as a genreal dividing line, Is this for a OLTP or OLAP database?
Here are some articles:
http://blogs.msdn.com/b/psssql/archive/2007/02/21/sql-server-urban-legends-discussed.aspx
If you are doing a data...
October 19, 2010 at 3:39 pm
If you are dealing with mixed types you can cast everything to sql_variant.
Here is a link that describes the technique:
http://www.norimek.com/blog/post/2008/04/Dynamic-Sort-Parameters-in-MS-SQL-Server-2005.aspx
September 9, 2010 at 9:25 am
You cannot change the collation of a column that is currently referenced by any one of the following:
-A computed column
-An index
-Distribution statistics, either generated automatically or by the CREATE...
September 8, 2010 at 2:50 pm
You don't.
From BOL:
The char data type is a fixed-length data type when the NOT NULL clause is specified. If a value shorter than the length of the column is...
August 16, 2010 at 2:19 pm
One option might be to use the sp_msforeachdb stored proc.
For exmaple:
EXEC sp_msforeachdb 'SELECT (size *8)/1024 as MB, * from ?.sys.database_files'
I also found this after doing a search:
http://www.siusic.com/wphchen/t-sql-query-to-get-database-size-325.html
August 5, 2010 at 12:43 pm
Here are a coupel of links that might help:
http://sqlinthewild.co.za/index.php/2009/08/17/exists-vs-in/%5B/url%5D
http://sqlinthewild.co.za/index.php/2010/01/12/in-vs-inner-join/%5B/url%5D
August 4, 2010 at 5:05 pm
The default should be ON, but that can be changed at the database level.
From BOL:
Specifies ISO compliant behavior of the Equals (=) and Not Equal To (<>) comparison operators when...
July 29, 2010 at 11:20 am
Viewing 15 posts - 91 through 105 (of 288 total)