Viewing 15 posts - 3,211 through 3,225 (of 5,394 total)
Fair point.
If you don't want to use a cursor, you can use sp_MSForEachDB.
EXEC sp_MSForEachDB '
USE [?];
SET NOCOUNT ON;
DECLARE @objectid int;
DECLARE @indexid int;
DECLARE @partitioncount bigint;
DECLARE @schemaname nvarchar(130);
DECLARE @objectname nvarchar(130);
DECLARE...
May 24, 2011 at 3:29 am
You can divide by 0.25 and use CEILING to round up:
;WITH Numbers (N) AS (
SELECT 2.20
UNION ALL
SELECT 2.60
UNION ALL
SELECT 2.80
UNION ALL
SELECT 2.10
)
SELECT CEILING(N / 0.25)...
May 24, 2011 at 3:21 am
I would suggest using Ola Hallengren's Index Maintenance script:
http://ola.hallengren.com/scripts/IndexOptimize.sql
I don't want to take away from your script, but... why reinvent the wheel?
May 24, 2011 at 3:15 am
See here:
http://msdn.microsoft.com/en-us/library/ms190673(SQL.90).aspx
Enable AWE to allow SQLServer to use more than 4 GB of RAM.
Hope this helps
Gianluca
May 24, 2011 at 2:00 am
I suppose that you want to do this calculation for each patient.
This could be a nice way to do it with a single scan:
IF OBJECT_ID('tempdb..#INPUT_DATA') IS NOT NULL DROP TABLE...
May 23, 2011 at 2:21 am
Oracle (which version, BTW?) does not support CROSS APPLY. You can chenge it to a CROSS JOIN:
SELECT A.REPORT_DATE,
A.REPORT_TYPE,
...
May 20, 2011 at 1:58 am
I built a SQL2K8 cluster on VirtualBox last month, using Win2K3 and FreeNas for the storage.
Could it be a suitable setup for an article?
May 18, 2011 at 1:30 am
Well, actually you don't need a CTE, but you could tweak Howard's code to take the distinct into account:
SELECT SaleID FROM #SalesDetails sd
INNER JOIN #ProdList ON sd.ProductID = #ProdList.ProductID
GROUP BY...
May 17, 2011 at 10:54 am
Something like this should do:
;WITH Sales AS (
SELECT SaleId, COUNT(DISTINCT ProductId) AS DistinctProducts
FROM #SalesDetails
WHERE ProductId IN (SELECT ProductId FROM #ProdList)
GROUP BY SaleId
),
Products AS (
SELECT COUNT(DISTINCT ProductId) AS DistinctProducts
FROM #ProdList
)
SELECT SaleID
FROM...
May 17, 2011 at 10:38 am
Syed Jahanzaib Bin hassan (5/17/2011)
check the second instance port
Default port is 1433 for default instance and 1434 is for browser service default service,change the second instance port restart the service...
May 17, 2011 at 9:31 am
You can also check PortQuery from Microsoft and see if your SQLBrowser is reachable:
portqry.exe -n yourServerNameGoesHere -e 1434 -p UDP
May 17, 2011 at 7:13 am
You have to check whether SQLBrowser service is running and reachable from the client.
SQLBrowser uses UDP port 1434 IIRC, so you just have to check your firewall rules and...
May 17, 2011 at 7:01 am
Koen Verbeeck (5/17/2011)
And now I've reached the 5000-points milestone.W00t w00t! :w00t: 😎 :hehe:
Ahem.... Back to the tasks at hand... 😀
Congrats!
You can keep a postcard of this moment:
May 17, 2011 at 3:58 am
OK, it's much clearer now.
Dependency checks are not performed when you create a stored procedure.
See BOL here:
May 16, 2011 at 5:59 am
Viewing 15 posts - 3,211 through 3,225 (of 5,394 total)