Viewing 15 posts - 3,211 through 3,225 (of 5,393 total)
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)...
-- Gianluca Sartori
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?
-- Gianluca Sartori
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
-- Gianluca Sartori
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...
-- Gianluca Sartori
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,
...
-- Gianluca Sartori
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?
-- Gianluca Sartori
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...
-- Gianluca Sartori
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...
-- Gianluca Sartori
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...
-- Gianluca Sartori
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
-- Gianluca Sartori
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...
-- Gianluca Sartori
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:
-- Gianluca Sartori
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:
Deferred Name Resolution and Compilation
-- Gianluca Sartori
May 16, 2011 at 5:59 am
vinaseetha87 (5/16/2011)
@Loggeddt is Used to filter the data
Hmmm. Yes, this was clear, but HOW are you filtering data?
Should the query return rows that match the date exactly or are you...
-- Gianluca Sartori
May 16, 2011 at 5:54 am
Viewing 15 posts - 3,211 through 3,225 (of 5,393 total)