Viewing 15 posts - 1,066 through 1,080 (of 1,109 total)
Michaela's solution is good, but I'd like to add one thing to it. When you disable a constraint with "NOCHECK" it will do two things. It will disable it, and...
August 20, 2007 at 1:09 am
Synonyms can only be created for tables, views, functions, stored procedures and extended stored procedures. (And there are some limitations even for these.)
Regards,
Andras
August 18, 2007 at 11:37 am
Just to add to my solution: It works on SQL Server 2005 only. You can read more about pivot and unpivot on
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/24ba54fc-98f7-4d35-8881-b5158aac1d66.htm
Andras
August 17, 2007 at 9:20 am
Hi Karthik,
UNPIVOT can do what you need. The query would look like:
SELECT PropertyID, data
FROM ( SELECT
CONVERT(FLOAT,SUM(ParAmt)) ParAmt
...
August 17, 2007 at 9:16 am
Have a look at SQL Doc from Red Gate (disclaimer: I work for them).
Regards,
Andras
August 17, 2007 at 2:26 am
Peter's solution is indeed impressive. It does seem to be faster, and unlike the CLR solution, but like the user defined function, it allows ordering the items that are to...
August 17, 2007 at 2:22 am
SELECT [Length]
, [Width]
, [Thickness]
FROM ( SELECT ItemID
...
August 17, 2007 at 2:13 am
This is not a simple thing to do If you want to know what a user is currently accessing in the user interface...
August 17, 2007 at 1:55 am
There is not really an oldest transaction log. Transaction logs are on a per database basis. A database may have several transaction logs (in which case all of them are...
August 17, 2007 at 1:45 am
As always the answer is: it depends
For your tempdb, if it is not write intenisve, then RAID 5, if it is write intensive...
August 16, 2007 at 9:35 am
Another thing to add to Alexander Chigrik's article is that SQL Server 2005 is puts a larger load on tempdb than 2000.
Regards,
Andras
August 16, 2007 at 8:59 am
Joe is right about the truncation being useless if you do not back up the transaction log and are running in full or bulk recovery mode. Before running shrink file,...
August 16, 2007 at 8:56 am
Of course if one wants to use AVG(FLOOR, the query can be simplified to:
DECLARE @today datetime
SELECT @today = GETDATE()
SELECT AVG(DATEDIFF(year, dob, @today)) from ages
WHERE dob IS NOT NULL
(and I'm getting...
August 16, 2007 at 8:42 am
It depends on what you would like to count
AVG(FLOOR will give you the average of ages expressed in years, so if someone is...
August 16, 2007 at 8:32 am
DECLARE @today datetime
SELECT @today = GETDATE()
SELECT AVG(FLOOR(DATEDIFF(day, dob, @today) / 365.2425)) FROM ages
WHERE dob IS NOT NULL
(assuming that the table is called "ages", and the column with the date of...
August 16, 2007 at 7:43 am
Viewing 15 posts - 1,066 through 1,080 (of 1,109 total)